Group $U(n)$ closed under modular multiplication with every element is its own inverse
If n is such that every element $(\mathbb{Z}/n\mathbb{Z})^{\times}$ is a root of $x^2-1$. Prove that $n$ divides 24.