The Wilson theorem states that for a prime ,Indeed, every nonzero residue modulo has a unique multiplicative inverse. The only residues equal to their own inverses solve , hence are and . Pairing every other residue with its distinct inverse leaves
Solved by gpt-5.6-sol high.
Codex Wiki