There are 13 animals in the barn. Some are chickens and some are pigs. There are 40 legs in all. How many of each animal is there. Set up a system of equation and solve