Mariya has come up with the following definition for a rich number. It is given a positive integer . Then a positive integer is called a rich number (relative to ) if the sum of its divisors except is greater than . For example, the number (whose sum of divisors is ) is rich relative to but it isn't rich relative to .
Task
Write a program to help Mariya. The program will be given queries that are ordered triples of positive integers and for each query it should calculate the number of rich numbers relative to , which are greater than or equal to and less than or equal to .
Input
The first line of the standard input contains one positive integer — the number of queries that your program has to process.
Each of the next lines contains three positive integers , and , which describe a query for your program to process.
Output
Your program should output to the standard output lines — one line for each query in the order of the input. Each line should contain the answer to the corresponding query.
Constraints
Subtasks
Subtask 1 (5 points)
Subtask 2 (10 points)
Subtask 3 (30 points)
Subtask 4 (55 points)
- No additional constraints
Example
stdin
3
5 15 5
1 20 20
12 20 10
stdout
6
2
4