Problem: You are given integers .
For each find its two divisors and such that (where is the greatest common divisor of and ) or say that there is no such pair.
Input Format: The first line contains single integer () — the size of the array .
The second line contains integers () — the array .
Output Format: To speed up the output, print two lines with integers in each line.
The -th integers in the first and second lines should be corresponding divisors and such that or and if there is no such pair. If there are multiple answers, print any of them.
Note: Let's look at . It has divisors greater than : , , . As you can see, the sum of any pair of divisors is divisible by as well as .
There are other valid pairs of and for , like or . You can print any of them.