Posted as an answer as it is too long for a comment
Let it be some prime number $p$. It is known that the set of numbers $G=(Z/pZ)^x=\{1,2,\dots,p-1\}$ forms a group under multiplication; therefore, for each element $a$ of $G$, there is a unique multiplicative inverse $b$ in $G$ such that $ab\equiv 1\pmod p$. It is important to note that $1$ and $p-1$ are each one their own multiplicative inverse.
This implies that, if we take all the elements of $G$ in pairs $(a,b)$, each pair $(a_k,b_k)$ can be expressed as $c_{k}p+1$, where $c$ is some positive integer. And if we multiply them all, we get that $$(p-1)!=1(p-1)(c_1p+1)(c_2p+1)\dots(c_\left({\frac{p-1}{2}-1}\right)p+1)\equiv -1\pmod p$$
With this expression, it can be proved the conditional part of Wilson's theorem: if $p$ is some prime number, then $(p-1)!\equiv -1\pmod p$.
The existence of some $c_k=1$ is guaranteed for every odd prime number $p$ by the fact that $2b\equiv 1 \pmod p$ has the unique solution $b=\frac{p+1}{2}$ for every odd prime number $p$. As $2\left(\frac{p+1}{2}\right)=c_kp+1$, it follows that $c_k=1$ for the pair $(2,\frac{p+1}{2})$.
As a result, if we consider wlog the pair $(2,\frac{p+1}{2})$=$(a_1,b_1)$=$(c_{1}p+1)$, we have that
$$(p-1)!=1(p-1)(p+1)(c_2p+1)\dots(c_\left({\frac{p-1}{2}-1}\right)p+1)$$
$$(p-1)!=\left(p^2-1\right)\left((c_2p+1)(c_3p+1)\dots(c_\left({\frac{p-1}{2}-1}\right)p+1)\right)$$
If we consider the term $\left((c_2p+1)(c_3p+1)\dots(c_\left({\frac{p-1}{2}-1}\right)p+1)\right)$, it can be seen that it is of the form $p^{k}m+1$, where $k\geq 1$. Therefore, $$(p-1)!=\left(p^2-1\right)\left(p^{k}m+1\right)$$
Expanding the product, we get that $$(p-1)!=p^{k+2}m+p^2-p^{k}m-1=$$
$$(p-1)!=p^2\left(p^{k}m-p^{k-2}m+1\right)-1$$
Therefore, $$(p-1)!+1=p^2\left(p^{k}m-p^{k-2}m+1\right)$$
It follows that the term between brackets of the RHS is coprime to $p$, and thus $p^2$ is the maximum power possible dividing $(p-1)!+1$, unless $k=2$ and $p\mid m+1$.
Expanding the term $\left((c_2p+1)(c_3p+1)\dots(c_\left({\frac{p-1}{2}-1}\right)p+1)\right)$ it can be seen that $k=2$ only if $p\mid \sum_{i=2}^{\frac{p-1}{2}-1}c_i$, which constitutes a necessary condition for Wilson primes. However, proving that $p\nmid m+1$ for every prime number $p$ might be hard.
A number $p \in \mathbb{N}$ is prime if and only if for all $1 \leq n \leq p$
$$
(n-1)!(p-n)!\equiv(-1)^n \pmod{p}.
$$
This theorem can be easily proved with complete induction on $n$ and with Wilson's theorem. If you set $n=\frac{p+1}{2}$ here, the result is:
$p \in \mathbb{N}$, $p>2$ is prime if and only if $$\left(\left(\frac{p-1}{2}\right)!\right)^2 \equiv(-1)^{\frac{p+1}{2}} \pmod{p}.$$
This is what you want.
You can also prove your statement directly, as a hint, use that:
$$\begin{aligned}
p-1 &\equiv-1 \pmod{p}\\
p-2 &\equiv-2 \pmod{p}\\
& \hspace{2.25mm}\vdots \\
\frac{p+1}{2} &\equiv-\frac{p-1}{2} \pmod{p}
\end{aligned}$$
Best Answer
Let $p$ be an odd prime. The set $S=\{2,3,\ldots, p-2\}$ contains $p-3$ numbers. For each $a\in S$, there is some $a'$ such that $aa'\equiv 1\pmod p$. We can assume $a'\in\{0,\ldots, p-1\}$, but since $a\not\equiv 1$, we know $a'$ is not $1$ or $p-1\equiv-1$. Clearly also $a'\neq 0$, so $a'\in S$.
Thus $a$ and $a'$ form a pair, and we clam that $a'$ is unique. If $ab'\equiv 1\pmod p$, then $aa'\equiv ab'$. Multiplying both sides by $a'$ gives $a'aa'\equiv a'ab'$, and so $a'\equiv b'$. But we were assuming $a',b'$ are in $\{0,\ldots, p-1\}$, so in fact $a'=b'$.
Next we claim $a'\neq a$. Otherwise $a^2\equiv 1\pmod p$, so by lemma $1$, $a=1$ or $a=p-1$, neither of which are true.
This shows that every element $a\in S$ has exactly one partner $a'\neq a$, and so $S$ can be broken up into $\frac{p-3}{2}$ such pairs.