5. A supermarket has a certain number of oranges and apples, which are packed together. If each bag contains 5 oranges and 7 apples, then when the apples are exactly finished, there is 1 orange left. If each bag contains 9 oranges and 7 apples, then when the oranges are exactly finished, there are 21 apples left. The total number of oranges and apples is $\qquad$ .
\begin{tabular}{c}
5 \\
\hline 85
\end{tabular}