Hide
Problem E
Gauss Squares
Languages
en
is
You are given a prime $p$ satisfying $p = 1 \pmod{4}$ and should print non-negative integers $x, y$ satisfying $p = x^2 + y^2$.
Input
The first and only line of input contains a prime $p \leq 10^{18}$ which satisfies $p = 1 \pmod{4}$.
Output
Print two non-negative integers $x, y$ separated by a space that satisfy $x^2 + y^2 = p$.
Sample Input 1 | Sample Output 1 |
---|---|
73 |
8 3 |