Cum se rezolv probleme ?

"Intr-o gospodarie sunt gaste si oi,in total 43 de capete si 124 de picioare .

Cate gaste si cate oi erau?"