402830: GYM100905 B Amusing numbers
Memory Limit:512 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
B. Amusing numberstime limit per test1 secondmemory limit per test512 megabytesinputstandard inputoutputstandard output
Bulat is fond of mathematics and already has solved a lot of problems. He thought, that he would be able to solve any problem, but his teacher gave him very interesting problem.
Let's call integer n amusing, if two conditions hold:
- n is composite
- Number of divisors of n is a prime number
Now Bulat want's to answer the question: how many amusing numbers are there from l to r, inclusive? This problem seems very difficult for him, so he asks for your help.
InputInput consists of two integers l and r (1 ≤ l ≤ r ≤ 1014).
OutputOutput single integer: number of amusing number from l to r inclusive.
ExamplesInput1 9Output
2Input
3 6Output
1Input
6 9Output
1