You are given queries where each query is in the form of two integers, and , such that:
For each query, find the following value:
where denotes that each is a divisor of and is the sum of the divisors of . Then print the value of on a new line.
Input Format
The first line contains an integer, , denoting the number of queries.
Each line of the subsequent lines contains two space-separated integers describing the respective values of and for query .
Constraints
Output Format
For each query, print a single integer denoting the value of on a new line.
Sample Input 0
3
2 0
3 0
2 4
Sample Output 0
72
13968
196320
Explanation 0
For the first query, we are given and . Recall that the sequence of prime numbers is . We use and to calculate .
The divisors of are . We then use them to calculate the following:
Finally, we print the value of on a new line. We then follow the same process to answer the second and third queries.