Write , and . The residues are exactly the odd factors of , in reverse order. Hence
by Wilson's theorem. It follows that the odd-residue squared product modulo a prime is
Thus it is for and for .