Who is More Dear?
At Sāvatthī, King Pasenadi asks Queen Mallikā whether there is anyone more dear to her than herself. She answers that there is not, and turns the question back on him; he says the same. The king then goes to the Buddha and tells him what was said. Understanding the matter, the Buddha speaks a verse: search every quarter with the mind and you find no one dearer than yourself; others feel the same about themselves; so one who desires self-knowledge would harm no other. The same exchange is recorded in SN 3.8.
The full text
Heartfelt Sayings 5.1 · Who is More Dear? · translated by Bhikkhu Sujato · public domain (CC0) · about 1 min · on SuttaCentral
So I have heard. At one time the Buddha was staying near Sāvatthī in Jeta’s Grove, Anāthapiṇḍika’s monastery. Now at that time King Pasenadi of Kosala was upstairs in the royal longhouse together with Queen Mallikā. Then King Pasenadi addressed Queen Mallikā, “Mallikā, is there anyone more dear to you than yourself?”
“No, Great King, there isn’t. But is there anyone more dear to you than yourself?” “For me also, Mallikā, there’s no one.”
Then King Pasenadi of Kosala came downstairs from the stilt longhouse, went to the Buddha, bowed, sat down to one side, and told him what had happened.
Then, understanding this matter, on that occasion the Buddha expressed this heartfelt sentiment:
“Having explored every quarter with the mind,one finds no one dearer than oneself.Likewise for others, each holds themselves dear;so one who desires self-knowledgewould harm no other.”