Given A,B print the number of pairs (a,b) such that GCD(a,b)=1 and 1<=a<=A and 1<=b<=B.
First line contains an integer T, the number of testcases. Each of next T lines contains two space separated integers denoting A and B.
Output T lines, each containing single integer, the required output for each test-case.
1 <= T <= 10
1 <= A <= 10^5
1 <= B <= 10^5
Need smart ways to find prime numbers as bruteforce is not working. Preferable in C#