CMIMC 2022 Algebra and Number Theory Division 2 Problem 3

How many 4-digit numbers have exactly 9 divisors from the set \{1,2,3,4,5,6,7,8,9,10\}?