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

#SP0000103. Khoảng cách nguyên tố phổ biến nhất (Jumping Champion)

HỌC THEO LỘ TRÌNH

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

1 lộ trình

Khoảng cách nguyên tố phổ biến nhất (Jumping Champion)

Jumping Champion

Source: UVa

Version: Phuoc Hung OJ Extended

Problem Statement

List every prime in the closed interval [L,U][L,U] in increasing order. Compute the difference for each consecutive pair. A difference is the jumping champion when it occurs more often than every other difference. Print the champion if it is unique. If there are fewer than two primes, or multiple differences tie for the maximum frequency, print the prescribed no-champion message.

Frequencies are computed using consecutive primes within the chosen interval. A pair crossing an interval boundary is not counted.

Input

One line contains two integers LL and UU, the inclusive left and right endpoints of the interval.

Output

If there is a unique champion, print The jumping champion is NUM, replacing NUM with the difference; otherwise print No jumping champion.

Subtasks

  • Subtask 1 (20 points): 0≤L≤U≤10000\le L\le U\le 1000; U−L≤100U-L\le 100.
  • Subtask 2 (30 points): 0≤L≤U≤1000000\le L\le U\le 100000; U−L≤10000U-L\le 10000.
  • Subtask 3 (50 points): 0≤L≤U≤10000000\le L\le U\le 1000000; U−L≤1000000U-L\le 1000000.

Examples

Input

2 11

Output

The jumping champion is 2

Explanation

The primes in the interval are 2,3,5,7,112,3,5,7,11, yielding successive differences 1,2,2,41,2,2,4. The difference 22 occurs twice while each other difference occurs once, so the unique champion is 22.