Farmer bob has a lot of chickens and pigs. If the pigs and chickens had the total of 17 heads and 46 legs, how much of each animal does farmer bob have?