Show that exactly half of $1^{\frac{p-1}{2}}, 2^{\frac{p-1}{2}}, \dots, (p-1)^{\frac{p-1}{2}}$ are congruent to 1 modulo $p$ 
Let $p$ be an odd prime number. Look at the numbers in the set
  \begin{align*}
S \in \{1^{\frac{p-1}{2}}, 2^{\frac{p-1}{2}}, \dots, (p-1)^{\frac{p-1}{2}}\}
\end{align*}
  Show that exactly half of these numbers are congruent to 1 modulo $p$. 

I define two polynomials 
\begin{align*}
&f(x) = x^{\frac{p-1}{2}} - 1 \\
&g(x) = x^{\frac{p-1}{2}} + 1
\end{align*}
According to Lagranges theorem, the congruences
\begin{align*}
&f(x) \equiv 0 \pmod{p} \\
&g(x) \equiv 0 \pmod{p}
\end{align*}
or 
\begin{align*}
&x^{\frac{p-1}{2}} \equiv 1 \pmod{p} \\
&x^{\frac{p-1}{2}} \equiv -1 \pmod{p}
\end{align*}
will have maximum $\frac{p-1}{2}$ slutions each. Thus, we can say that maximum half of the numbers in $S$ will be congruent to either 1 or -1 modulo $p$. How can I show that exactly half of the numbers are congruent to 1 or -1 modulo $p$?

$x^p-1=0$ has $p-1$ solutions. 
 $$x^p-1=(x^{\frac{p-1}{2}}-1)(x^{\frac{p-1}{2}}+1)$$ and since each of 
$x^{\frac{p-1}{2}}-1$ and $x^{\frac{p-1}{2}}+1$ has at most $\frac{p-1}{2}$ many solutions both must have exactly  $\frac{p-1}{2}$ many solutions.
