#BS0000060. Các số gần nguyên tố (Almost Prime Numbers)

Các số gần nguyên tố (Almost Prime Numbers)

Almost Prime Numbers

Source: UVa

Version: Phuoc Hung OJ Extended

Problem Statement

A positive integer xx is called an almost prime number if xx is not prime and all of its prime divisors are the same.

Equivalently, xx is almost prime if and only if there exist a prime number pp and an integer k≥2k\ge2 such that

x=pk.x=p^k.

For example, 4=224=2^2, 8=238=2^3, and 9=329=3^2 are almost prime numbers, while 6=2⋅36=2\cdot3 is not.

Given two integers low and high, count the almost prime numbers xx satisfying

low≤x≤high.low\le x\le high.

Input

The only line contains two integers low and high.

Output

Print one integer: the number of almost prime numbers in the closed interval [low,high][low,high].

Subtasks

  • Subtask 1 — 20%: 1≤low≤high≤1061\le low\le high\le10^6.
  • Subtask 2 — 30%: 1≤low≤high≤1091\le low\le high\le10^9.
  • Subtask 3 — 50%: 1≤low≤high<10121\le low\le high<10^{12}.

Example

Input

1 10

Output

3

Explanation

The almost prime numbers in [1,10][1,10] are

4=22,8=23,9=32.4=2^2,\qquad 8=2^3,\qquad 9=3^2.

Hence the answer is 33.