Primes#421

Primes

10 seconds
256 megabytes
Easy (≈1000)

Let and n~(2 \le m < n \le 10^7) be two integers. Consider the following set:

Prime~(m, n) = { | prime and m \le p \le n }.

Find the cardinality of the set Prime~(m, n).

Input

Consists of several tests. The input of each test is represented on a single line. Any two consecutive tests are separated by an empty line. For each test, the values for and are given on the same line, separated by exactly one space.

Output

For each test, the result will be written on a different line (the tests will have the same order as in the input). The results of any two consecutive tests will be separated by an empty line. For each test, the result will be the cardinal of the set Prime~(m, n).

Examples

Example 1

Loading
Loading