an algebra teacher drove by a farmyard full of chickens and pigs. the teacher happened to notice that there were a total of 100 heads and 270 legs. How many chickens were there? How many pigs were there?