Originally Posted by

**Bacterius** Hello ! I'm having this little problem.

I thought it would be possible to state that $\displaystyle (m - 2)! = \frac{(m - 1)!}{m - 1}$, thus we have $\displaystyle \frac{(m - 1)!}{m - 1} \equiv 1 \pmod{m}$. From Wilson's Theorem, since $\displaystyle m$ is prime, $\displaystyle (m - 1)! \equiv m - 1 \pmod{m}$, thus we are left with $\displaystyle \frac{m - 1}{m - 1} \equiv 1 \pmod{m}$, which concludes the proof. But it is actually right ? I am not really confident with division inside $\displaystyle \mathbb{Z}/m \mathbb{Z}$.