Solution
= Solution
For an odd prime $p$, the <Legendre symbol> is
$$
\left(\frac ap\right)=
\begin{cases}
0,&p\mid a,\\
1,&a\not\equiv0\pmod p\text{ and }a\text{ is a square modulo }p,\\
-1,&a\text{ is a nonsquare modulo }p.
\end{cases}
$$
For distinct odd primes $p$ and $q$, <quadratic reciprocity> states that
$$
\boxed{
\left(\frac pq\right)\left(\frac qp\right)
=(-1)^{(p-1)(q-1)/4}.}
$$