Given Two integers L and R find the total number of distinct pairs (p,q) between L and R ( both inclusive ) satisfying the given relationship. p! * q!=k^2 (a perfect square) where p,q,k is any integer and '!' denotes factorial.
The first line of input contains of an integer 'T' denoting number of test cases.Only line of each testcase contains two integers L and R .
For each case print an integer corresponding to the answer .
1 <= T <= 100
0 <= L <= R <= 1018
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.