Could you please post solutions to these problems?

Problems from 50 Lectures Book 2(page 102)

Problem 16. How many four-digit numbers greater than 2999 can be formed such that the product of the middle two digits exceeds 5?

Ans. 4970

Problem 38. Twelve students are to be divided among Mr. Mirus’s and Ms. Batty’s classes. No teacher is to have

more than 8 students. How many different groups of students could be in Mr. Mirus’s class? (2001 Mathcounts Handbook).

Ans.3498