Fermat's Theorem on the Sum of Two Squares

Use this calculator to find

Calculator
Calculate \(r\) and \(q\) such that \( p = r^2 + q^2 \).
p \(=\)
Enter a prime number \(p\) such that \( p \equiv 1 \pmod{4} \)