Goats can tell when people are happy or angry, and they prefer to see people smiling, according to a new study published by The Royal Society.

The research, designed to determine the intelligence of goats in understanding human social cues, used 35 goats from a goat sanctuary in the United Kingdom.

The researchers presented the herd with images of happy and angry expressions on the same human face (they used a male and female face for different trials), set up on either side of a pen.

The scientists released the goats into the pen from a gate opposite to the location of both images and then timed the goats' interactions with each photograph to determine their preference.