PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN

#SP0000179. Những món quà có đúng ba ước

HỌC THEO LỘ TRÌNH

Bài tập thuộc lộ trình

1 lộ trình

Những món quà có đúng ba ước

Namit In Trouble

PHOJ ID: PRIME000184
Original source: SPOJ NGIRL
Version: PHOJ Extended, one dataset per run.

Problem statement

There are NN gifts at positions 1,2,…,N1,2,\ldots,N; the gift at position ii costs ii. Count (1) positions whose numbers have exactly three positive divisors and (2) such positions whose costs are strictly greater than KK.

Input

One line with integers NN and KK.

Output

Print two integers: the total number of eligible gifts, and how many of those cost more than KK.

Subtasks

  • Subtask 1 (20 points): 1≤N,K≤1041\le N,K\le10^4.
  • Subtask 2 (30 points): 1≤N,K≤1071\le N,K\le10^7.
  • Subtask 3 (50 points): 1≤N,K≤10101\le N,K\le10^{10}.

Example

Input

20 7

Output

2 1

Explanation

The only positions with exactly three divisors up to 20 are 4 and 9; only 9 is strictly greater than 7.