The Prophet ﷺ said, "Two women were once together with their two sons when a wolf came and carried off one of their sons. One said to the other, 'It was your son he took.' The other replied, 'No, it was your son he took.' So they brought their dispute to Dawud, who ruled in favor of the elder woman.Then they went out to Sulayman bin Dawud, peace be upon them both, and informed him. He said, 'Bring me a knife so I may divide the child between you.' The younger woman cried out, 'May Allah have mercy on you, do not do it. He is her son.' So he ruled that the child belonged to the younger woman."Abu Hurairah said, "By Allah, I had never heard the word sikkīn used for a knife until that day. We only ever called it a mudyah."
عن النبي ﷺ قال: بينما امرأتان معهما ابناهما، جاء الذئب فذهب بابن إحداهما، فقالت هذه لصاحبتها: إنما ذهب بابنك أنت. وقالت الأخرى: إنما ذهب بابنك. فتحاكمتا إلى داود فقضى به للكبري، فخرجتا على سليمان بن داود عليهما السلام، فأخبرتاه، فقال: ائتوني بالسكين أشقه بينكما. فقالت الصغرى: لا يرحمك الله هو ابنها، فقضى به للصغرى. قال: قال أبو هريرة: والله إن سمعت بالسكين قط إلا يومئذ، ما كنا نقول إلا المدية.
Bukhari related it in the chapters on the prophets (3427), and Muslim in the chapters on judgments (1720:20), both through various routes from Abu Zinad, from Araj, from Abu Hurairah, who narrated it. The wording given is Muslim's, and Bukhari's wording is similar.