Let x = number of chickens
Let y = number of rabbits
x + y = 20 (heads)
2x + 4y = 56 (legs)
Solving the equations:
x + y = 20
2x + 4y = 56
Subtracting equation 1 from equation 2:
2x - x = 56 - 20
x = 36
Substituting x = 36 into equation 1:
36 + y = 20
y = 20 - 36
y = -16
Therefore, there are 36 chickens and -16 rabbits in the chicken coop.