There are 19 animals on a farm. Some are goats and some are chickens. There are 42 legs in all. How many animals are goats and how many are chickens? (assume all have the typical number of legs)​