GCD and NOD

Limits 500ms, 512 MB

Given 3 numbers, G, A and B we have to find two numbers M and N such that they satisfy the following conditions:

It is possible that multiple pairs of M and N satisfy the above conditions. In such a case, we want to find the pair where M is minimum. If there is still tie, then we minimize N.

It is guaranteed that a solution always exists.

Input

The first line contains a single integer T (T ≤ 100) denoting number of test case. The next T lines describes each test case. Each test case is a single line containing three integers: G, A and B.

Output

For each test case, output a single line containing two integers: M and N satisfying the conditions mentioned in problem statement above.

Sample

InputOutput
2
1 2 2
6 6 8
2 3
12 54