Baruch Spinoza said this quote

men, in so far as they live in obedience to reason necessarily do only such things as are necessarily good for human nature, and consequently for each individual man.