There are 41 animals on a farm , each of which is either a pig or a chicken . There are 100 legs altogether . How many pigs are there? How many chickens?