Question: If $p$ is prime and $p$ $\equiv$ $1$ (mod 4), then the congruence $x^2$ $\equiv$ $-1$ (mod $p$) has two incongruent solutions given by $x$ $\equiv$ $\pm$ $\frac{(p-1)}{2}$!(mod $p$).
I noticed that the congruence $x^2$ $\equiv$ $-1$ (mod $p$) fits the form of Wilson's theorem but can't figure out how to modify/change the congruency to fit Wilson's theorem. Sorry if this is a duplicate, I wasn't able to find any other question similar to this one but it could just be my incorrect usage of MathJax.