BETA

Difficulty Level: Basic

Submissions: 2945 Accuracy:

56.77%

LCM And GCD
     

For 2 given numbers find out their LCM and GCD.

Input:
The first line contains an integer 'T' denoting the total number of test cases. In each test cases, there are two numbers a and b.


Output:
Find LCM and HCF. 


Constraints:
1 <= T <= 30
1 <= a <= 1000
1 <= b <= 1000


Example:
Input:
2

5 10

14 8

Output:
10 5
56 2

** For More Input/Output Examples Use 'Expected Output' option **

Set Default Code

					   
It is recommended to 'Compile & Test' your code before clicking 'Submit'!

Compilation/Execution Result:

Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.