2. On 8 balls, numbers are written: $2,3,4,5,6,7,8,9$. In how many ways can the balls be placed into three boxes so that no box contains a number and its divisor?
Answer: 432.

Solution. The numbers 5 and 7 can be placed in any box, the number of ways is $3 \cdot 3=9$. The numbers $2, 4, 8$ must be in different boxes, the number of ways is $3 \cdot 2 \cdot 1=6$. Thus, the numbers $2, 4, 5, 7, 8$ can be arranged in 54 ways. Suppose the numbers 2 and 3 are placed in the same box (this box is already chosen for the number 2). Then there are two choices left for the number 9, and 2 choices for the number 6, in total $54 \cdot 2 \cdot 2=216$ ways. Suppose the numbers 2 and 3 are placed in different boxes, the number of choices for the box for 3 is 2. Then the box for the number 6 is chosen in a unique way, and the box for the number 9 is any of the two where there is no number 3, in total $54 \cdot 2 \cdot 2=216$ ways, thus $216+216=432$.