The product of all digits of positive integer M is 105. How many such Ms are there with four digits?
The prime factorization of 105 is: 3 * 5 * 7. Therefore, the 4 digit number must have the digits: 1,3,5, and 7. There are 4! ways to rearrange these numbers, so the answer is 4! = 24.