GCD and LCM
Easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
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 .
Output
For each test case print on a separate line the GCD and LCM of and .
Examples
Input #1
Answer #1
Submissions 509
Acceptance rate 50%