cho.sh
Notes
Loading...

Almost Prime

Time limit

2s

Memory limit

256 MB

Problem

A number is called an almost prime if it can be written as p^N, where p is a prime number and N is an integer with N >= 2.

Given two integers A and B, count how many almost primes are greater than or equal to A and less than or equal to B.

Input

The first line contains two integers A and B, separated by a space.

Output

Print the number of almost primes in the given range.

Constraints

  • 1 <= A <= B <= 10^14