I’ll go further and point out that God meant men and women to marry and then have families. These cases would give Solomon a headache.
Reading this, I got the mental picture of Solomon,when the two women brought the child before him, both saying she was the true mother, of raising his hand to this forehead and saying "Oy ve!".