> 
> Let $a,b,c,d$ be a permutation of the numbers $1,9,8,4$ and let $n = (10a+b)^{10c+d}$. Find the probability that $1984!$ is divisible by $n$.
> 
> 
> 

I was told this could be solved by casework on $a$ and using Fermat's Little Theorem. For example, if $a = 1$, there are $6$ possibilities; if $a = 4$, there are $4$ possibilities; and if $a = 8,9$, there are $5$ possibilities.
How do I use Fermat's Little Theorem to get this?