77. Director Wang brought a bag of apples. If the apples are distributed among the staff of both Department A and Department B, each person can get 6 apples; if they are only distributed among the staff of Department A, each person can get 10 apples. If they are only distributed among the staff of Department B, each person can get $\qquad$ apples.