You are given queries. In each query, you are given two integers and , find the number of pairs of integers such that, and.
Input format
Output format
Output Q lines, each line containing a single integer — the answer to the corresponding query.
Constraints
In the first query, the segments [1, 3] and [2, 3] satisfy the condition.
In the second query, the segments [1,4], [2, 4] and [3, 4] satisfy the condition.
In the third query, no segments satisfy the condition. Even though the lcm of [4,5] is 20, but the right endpoint 5 is greater than 3, so it is not counted.