This is an interactive problem.
For two positive integers x,y, we define π(x,y) to be the number of distinct primes that divide both x and y. For example π(2,3)=0, π(8,16)=1 and π(30,105)=2.
For two positive integers a,b, where a≤b, we define S(a,b) to be the sum of values π(x,y) over all pairs of integers (x,y) satisfying a≤x<y≤b.
Your task is to compute the values S(a,b) for many query pairs (a,b). To make your task more challenging, all the queries have to be answered online.
The first line of the input contains a single integer q (1≤q≤5⋅104), denoting the number of queries. The next q lines describe the queries. The i-th of these lines contains two integers a_i,b_i (1≤a_i≤b_i≤106).
Note that the i-the query (i≥2) will be available at the input only after you output the answer to the (i−1)-th query.
You should print exactly q lines. The i-th of these lines should contain the value S(a_i,b_i).
Do not forget to flush the output after answering each query.