| Winter Cup 5.0 Online Mirror Contest |
|---|
| Finished |
In the land of Westeros, there lived two noble families, the Lannisters and the Starks. The Lannisters were known for their wealth and cunning, while the Starks were known for their honor and bravery.
One day, a wise maester approached both families with a mathematical problem. He told them that the solution to the problem would determine the worthiness of the families to rule the Seven Kingdoms.
The problem was to find two numbers, $$$a$$$ and $$$b$$$, such that their greatest common divisor and their least common multiple would add up to a given number, $$$x$$$. Moreover, the difference between the two numbers should be as small as possible, and $$$a$$$ must be less than or equal to $$$b$$$.
The first line contains the number of test cases $$$t$$$ $$$(1 \le t \le 100)$$$
The only line of each test case contains one integer $$$x$$$ $$$(2 \le x \le 10^{9})$$$
For every test case, output $$$a$$$ and $$$b$$$ ($$$1 \le a,b \le x$$$) such that those two integers satisfy the conditions.
It can be proven that the solution exists for every $$$x$$$.
6 9 13 17 21 777777779 809784331
3 6 3 4 1 16 4 5 9842322 18512939 130758 229141
| Name |
|---|


