Given an integer , you have to find the product of two different integers such that their LCM (Least Common Multiple) is and the product is maximum possible.
The first line contains an integer (), the number of test cases.
The next lines contain an integer (), LCM of two different integers.
For each test case, print the maximum possible product of those two integers. As the result can
be very big, print the result modulo .
3 5 13 27
5 13 243
For the first test case, let two integers and . and .
For the second test case, let two integers and . and .
For the third test case, let two intergers and . and . Another possible pair is and . but . So, the result should be .
Login to submit
Lets, LCM of the numbers AAA & BBB is equal to LLL and their prime factorizations are −-− A=p1a1...