There are 27 animals in a barn. There are a combination of cows and roosters. Altogether there are 78 legs. How many of each animal?

c + r = 27

4 c + 2 r = 78

solve the system