Divisors problem#2489

Divisors problem

5 seconds
64 megabytes
Very hard

For a positive integer , let be the smallest positive integer such that n \cdot x has exactly divisors not less than . You are given positive integers and (L \leq R). You need to find the sum

\sum_{x=L}^{R} f(x)

where p = 10^9 + 7.

Input

The first line of the input file contains a single integer , where T \leq 10^5 — the number of test cases.

Each of the following lines contains two integers and , where 1 \leq L \leq R \leq 10^7.

Output

For each pair of numbers and from the input file, print the value of the corresponding sum, each on a separate line.

Examples

Example 1

Loading
Loading