#P56. [KBC004Ex] Primes

[KBC004Ex] Primes

Source

This problem is adapted from Long Long OJ. All rights reserved.

Problem Description

Find the number of prime numbers in the interval [l,r][l, r] that can be expressed as the sum of squares of two positive integers.

Input Format

A single line containing two positive integers l,rl, r.

Output Format

A single line containing an integer representing the answer.

Samples

6 66
7

Data Range

Test Case ID ll rr
11 =r=r =1=1
22 =2=2
33 =3=3
44 =4=4
575 \sim 7 r\le r 100\le 100
8208 \sim 20 3×108\le 3 \times 10^8

For 100%100\% of the test cases, 1lr3×1081 \le l \le r \le 3 \times 10^8.