GCD and LCM#11606

GCD and LCM

1 second
128 megabytes
Easy

Two integers and are given. Find GCD and LCM of and .

Input

The first line contains the number of testcases . Then follow lines, each line contains two integers and b~(1 \le a, b \le 10^9).

Output

For each test case print on a separate line the GCD and LCM of and .

Examples

Example 1

Loading
Loading