10. (5 points) There are several apples and pears. If each bag contains 5 apples and 3 pears, then when the pears are exactly finished, there are still 4 apples left; if each bag contains 7 apples and 3 pears, then when the apples are exactly finished, there are still 12 pears left. How many apples and pears are there in total? $\qquad$