Question 12A farmer counted 40 heads and 124 legs among his sheep and ducks. How many sheep and how many ducks does he have?