#nt903. 互质数对
互质数对
Coprime Pairs
Problem Description
There are queries. Each query gives two numbers ; find the number of pairs such that , and are coprime.
Input Format
The first line contains an integer . The following lines each contain two integers .
Output Format
Output lines, each containing one number: the answer.
Sample Input
3
100 200
1000 2000
1000000 2000000
Sample Output
12203
1216677
1215854454422
Constraints
For all data, , .