Please help me,

Wendy went to a bakery to buy cakes and doughnuts. She spent $14 altogether on 30 cakes and doughnuts. Each cake cost 40 cents and each doughnut cost 50 cents. How many cakes and doughnuts did she buy?