Let, be the smallest positive integer which is divisible by all integers in range .
Given 3 positive integers , and , find an integer for which is divisible by . If there are more than one possible , find the largest one.
Input starts with an integer () denoting number of test cases.
The next lines each contains three integers , , ( and ).
For each test case, print an integer in one line containing your answer to that test case.
Input | Output |
---|---|
2 1 5 2 5 7 4 | 2 0 |