We raised goats when I was growing up... can confirm they're crazy smart. The poem left out how remarkably dumb sheep are, though. I'd heard reports of sheep that would get "stuck" by having a bit of wool snagged by a fence, and subsequently lie down to die. Try getting them to go through a wide-open gate, and they would just be positive it was untraversable terrain. Our goats would use the sheep as stepstools, standing on their backs to reach the apple trees.