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

#SP0000027. Nhiều ước nhất trên đoạn (Divisors)

HỌC THEO LỘ TRÌNH

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

1 lộ trình

Nhiều ước nhất trên đoạn (Divisors)

Divisors

Source: UVa

Version: Phuoc Hung OJ Extended

Problem Statement

Two integers LL and UU define an inclusive integer interval [L,U][L,U]. For an integer xx in this interval, let d(x)d(x) denote the number of its positive divisors, including 11 and xx.

Find an integer PP in [L,U][L,U] maximizing d(P)d(P). In a tie, choose the smallest such integer. Also determine D=d(P)D=d(P).

Input

One line containing integers LL and UU, the inclusive lower and upper endpoints.

Output

Print one line exactly in the form Between L and U, P has a maximum of D divisors. using the computed values. Preserve capitalization, commas, spaces and the final period.

Subtasks

  • Subtask 1 (20 points): 1≤L≤U≤1041\le L\le U\le 10^4; 0≤U−L≤1000\le U-L\le 100.
  • Subtask 2 (30 points): 1≤L≤U≤1071\le L\le U\le 10^7; 0≤U−L≤30000\le U-L\le 3000.
  • Subtask 3 (50 points): 1≤L≤U≤1091\le L\le U\le 10^9; 0≤U−L≤100000\le U-L\le 10000.

Examples

Input

1 10

Output

Between 1 and 10, 6 has a maximum of 4 divisors.

Explanation

The numbers 66, 88, and 1010 each have 44 positive divisors. The divisors of 66 are 1,2,3,61,2,3,6. No number in [1,10][1,10] has more than 44 divisors, and 66 is the smallest maximizer.

Input

1000 1000

Output

Between 1000 and 1000, 1000 has a maximum of 16 divisors.

Explanation

The interval contains only 1000=23⋅531000=2^3\cdot5^3, which has (3+1)(3+1)=16(3+1)(3+1)=16 divisors. Hence P=1000P=1000.