For an odd positive integer $n$ let $S$ be the set of integers $x$, $1 \le x \le n$ such that both $x$ and $x+1$ are relatively prime to $n$. Prove that $$\prod_{x\in S} x \equiv 1 \pmod n $$
Looking at $n=9$, $S=\{7,4,\}$ which I see are inverses modulo $9$. If I can prove that $x\in S \iff x^{-1} \in S$ we're done, but I'm unsure how to proceed with proving that?