Gerry visited a farm and saw a total of 87 chickens and pigs. If there were a total of 248 legs between all of these animals, how many animals were chickens, and how many were pigs?
Please help if you can!!!