Hide

Problem A
Factor with a Difference of Squares

Languages en is

Factor a product of two primes, $n=pq$, by using difference of squares.

Input

Input is one line, an integer $n$ that is a product of two primes $p$ and $q$ where $2 \leq |p-q| \leq 2^{20}$ and $2 \leq n \leq 2^{63}-1$.

Output

Output two lines. The first line should be the smaller factor. The second line should be the larger factor.

Sample Input 1 Sample Output 1
203299
263
773

Please log in to submit a solution to this problem

Log in