Farmer Brown had ducks and cows. One day she noticed that the animals had a total of 12 heads and 32 feet. How many of the animals were ducks and how many were cows?

y+x= 12

2y+4x=32
2y+2x=24
2x=8
x=4
y=8