Chris Martin is challenged with another problem. This time our favorite violinist Lindsey Stirling asked him to solve this problem. Lindsey will give Chris two integers and , such that . Chris has to find two integers and , such that , where LCM of and is as minimum as possible. Print this minimum value of LCM.
By definition, LCM or Least Common Multiple of two integers and is the minimum positive integer divisible by both and .
First line of the input will be an integer , denoting number of testcases. Each of the next lines will contain two integers and , denoting the numbers Lindsey gave to Chris in the corresponding testcase.
For each testcase, print the answer in one line.
Input | Output |
---|---|
2 1 3 4 6 | 2 12 |