Assume that $p$ is a prime number congruent to 1 modulo 4. Show that $(a,b)\in S(p)$ if and only if $$b = ha \quad \text{or} \quad b = -ha$$ where $h$ is a solution of $h^2=-1\bmod p$.
Assume that $p$ is a prime number congruent to 1 modulo 4. Show that $(a,b)\in S(p)$ if and only if
$$b = ha \quad \text{or} \quad b = -ha$$
where $h$ is a solution of $h^2=-1\bmod p$.