#nt1005. LCMSUM2
LCMSUM2
LCMSUM2
Problem Description
There are queries. Each query gives two numbers ; compute $\left(\sum_{i=1}^n \sum_{j=1}^m [i, j]\right) \bmod 2^{60}$, where denotes the least common multiple of and .
Input Format
The first line contains one integer .
Each of the next lines contains two integers .
Output Format
Output lines, each containing one number: the answer.
Sample Input
3
100 200
1000 2000
1000000 2000000
Sample Output
73830168
731817128790
282228897746124034
Constraints
For all test cases, and .