Friedrich Nietzsche said this quote

One must have a good memory to be able to keep the promises one has given. One must have strong powers of imagination to be able to have pity. So closely is morality bound to the quality of the intellect.