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

#SP0000039. Aladdin và tấm thảm bay (Aladdin and the Flying Carpet)

HỌC THEO LỘ TRÌNH

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

1 lộ trình

Aladdin và tấm thảm bay (Aladdin and the Flying Carpet)

Aladdin and the Flying Carpet

Source: LightOJ

Version: Phuoc Hung OJ Extended

Problem Statement

Aladdin finds a rectangular flying carpet with area aa. The carpet must not be square. Both side lengths are positive integers, and the shorter side must be at least bb.

Two carpets with the same unordered pair of side lengths count as the same type, even if rotated. Count the possible types. Equivalently, count pairs of integers x<yx<y satisfying xy=axy=a and x≥bx\ge b.

Input

One line containing integers aa and bb, the carpet area and the minimum allowed shorter side length.

Output

Print one line in the form Case 1: ans, where ans is the number of valid carpet types.

Subtasks

  • Subtask 1 (20 points): 1≤b≤a≤1051\le b\le a\le10^5.
  • Subtask 2 (30 points): 1≤b≤a≤1091\le b\le a\le10^9.
  • Subtask 3 (50 points): 1≤b≤a≤10121\le b\le a\le10^{12}.

Examples

Input

12 2

Output

Case 1: 2

Explanation

The integer side pairs with product 1212 are (1,12)(1,12), (2,6)(2,6), and (3,4)(3,4). The first is rejected because its shorter side is below 22. The other two are valid nonsquares, giving 22 types.

Input

100 3

Output

Case 1: 2

Explanation

The factor pairs are (1,100)(1,100), (2,50)(2,50), (4,25)(4,25), (5,20)(5,20), and (10,10)(10,10). The first two have shorter sides below 33 and the last is square. Thus only (4,25)(4,25) and (5,20)(5,20) remain, giving 22.