Time limit: 0.2s
Memory limit: 32MB
Input:
Output:
You are given an integer and your task is to check how many numbers from to can be written as sum of not necessary distinct prime numbers.
As this is too easy, you will have to check whether this is possible or not for such numbers.
Input
The first line will consist of only one number , representing the number of queries.
The next lines will consist of two integers and
Output
The output will consist of lines, each having a single element representing the answer of the problem.
Constraints
- For tests worth 10 points,
- For tests worth 20 more points,
- For tests worth 30 more points,
Example
stdin
4
7 3
10 4
11 5
7 4
stdout
2
3
2
0