<s>[INST] Primitive root modulo p Let $p$ be an odd prime with a primitive root $g$. Prove that $$\prod_{x=1}^{\frac{p-1}{2}}x^2 \equiv (-1)^{\frac{p+1}{2}}\pmod{p}.$$
Remark: I intend to use the relationship $g^{\frac{p-1}{2}} \equiv -1 \pmod{p}.$
 [/INST] $\prod_{1\le x\le p-1}x\equiv\prod_{1\le y\le p-1}g^y$
$=g^{1+2+\cdots +p-1}=g^{\frac{p(p-1)}2}=(g^\frac{p-1}2)^p\equiv (-1)^p=-1$
$\prod_{1\le x\le p-1}x=\prod_{1\le x\le \frac{p-1}2}x(p-x)$ as to avoid omission and repetition of terms $x\le p-x\implies x\le \frac p 2$ i.e., $x\le\frac{p-1}2$ as $p$ is odd
So, $\prod_{1\le x\le p-1}x\equiv(-1)^\frac{p-1}2\prod_{1\le x\le \frac{p-1}2}x^2$ 
So, $(-1)^\frac{p-1}2\prod_{1\le x\le \frac{p-1}2}x^2\equiv-1$
Multiplying either sides by $(-1)^{p-1},$ (which is legal as $(-1)^{p-1}=1$ as $p$ is odd)
$\prod_{1\le x\le \frac{p-1}2}x^2\equiv (-1)(-1)^\frac{p-1}2=(-1)^\frac{p+1}2$
</s>