A farmer has both sheep and chickens on his farm. All the animals have the expected number of parts. When his animals are all together, there are 90 legs and 32 heads. How many of each animal does he have?