Fermat's Little Theorem states that, if $p$ does not divide $a$, then:
$$a^{p - 1} \equiv 1 \pmod{p}$$
From this, can we derive the following:
$$a^{\frac{p - 1}{2}} \equiv \, ?\pmod{p}$$
If not, is there an answer to what $?$ should be in the above congruence?
Since $(a^{\frac{p-1}2})^2\equiv a^{p-1}\equiv 1\pmod p,$ $(a^{\frac{p-1}2})^2-1\equiv (a^{\frac{p-1}2}-1)(a^{\frac{p-1}2}+1)\equiv 0\pmod p,$ so $a^{\frac{p-1}2}\equiv \pm 1\pmod p.$