Concern for our own happiness recommends to us the virtue of prudence: concern for that of other people, the virtues of justice and beneficence; of which, the one restrains us from hurting, the other prompts us to promote that happiness.
 Adam Smith, The Theory of Moral Sentiments (1759). copy citation

Context

“In this, therefore, as well as in every other emotion, passion, and habit, the degree that is most agreeable to the impartial spectator is likewise most agreeable to the person himself; and according as either the excess or the defect is least offensive to the former, so, either the one or the other is in proportion least disagreeable to the latter.
CONCLUSION OF THE SIXTH PART.
Concern for our own happiness recommends to us the virtue of prudence: concern for that of other people, the virtues of justice and beneficence; of which, the one restrains us from hurting, the other prompts us to promote that happiness. Independent of any regard either to what are, or to what ought to be, or to what upon a certain condition would be, the sentiments of other people, the first of those three virtues is originally recommended to us by our selfish, the other two by our benevolent affections.” source