Hide

Problem E
Gauss Squares

Accepted submissions to this problem will be granted a score of 20
Languages en is

You are given a prime p satisfying p=1(mod4) and should print non-negative integers x,y satisfying p=x2+y2.

Input

The first and only line of input contains a prime p1018 which satisfies p=1(mod4).

Output

Print two non-negative integers x,y separated by a space that satisfy x2+y2=p.

Sample Input 1 Sample Output 1
73
8 3
Hide

Please log in to submit a solution to this problem

Log in