beecrowd | 1904

Odds and Evens 2.0

By Leandro Zatesko, UFFS BR Brazil

Timelimit: 4

Alice and Bob are two friends who live in planet Earth 2.0, built after the destruction of planet Earth 1.0 by the Vogons. In Earth 2.0 everything is upgraded. Human beings, for example, do not have only 10 fingers in the hands, but 10 million: 5 million in each hand. The traditional game ‘Odds and Evens’, very played in Earth 1.0, has also been upgraded. Alice and Bob play ‘Odds and Evens 2.0’ all the time. In this version of the game, the players are supposed to show at the same time using the hands an integer between 0 and 10 million. If the numbers shown by both players are equal, we have a tie. Otherwise, the players alternate writing down numbers in a piece of paper. Let A be the integer shown by Alice in the beginning of the match and let B be the integer shown by Bob, each number written down must be a product of |A - B| factors, with all factors being prime numbers, not necessarily distinct, belonging to the interval defined by the integers A and B. Besides, a number is never allowed to be written down more than once. Loses the match the player who happens not to be able of writing down a new number when it is his or her turn to play. As Bob is a gentleman, Alice is always the first to play. Note that if there are no prime numbers in the interval defined by the integers A and B, Alice cannot write down any number in her first turn, and Bob wins the match.

For example, if A = 2 and B = 5, there are only 10 numbers which can be written down in the paper, which are:

8 = 2 × 2 × 2

12 = 2 × 2 × 3

20 = 2 × 2 × 5

18 = 2 × 3 × 3

30 = 2 × 3 × 5

50 = 2 × 5 × 5

27 = 3 × 3 × 3

45 = 3 × 3 × 5

75 = 3 × 5 × 5

125 = 5 × 5 × 5

This way, if both Alice and Bob play optimally, Bob wins the match in this case.

Input

The input consists of two integers A and B (0 ≤ A, B ≤ 107), which represent respectively the numbers shown by Alice and Bob in the beginning of the match, as explained previously.

Output

Your program shall output a single line containing singly the match winner's name, assuming that both players play optimally. If the match ties, the output line shall contain singly the symbol ?.

Input Samples Output Samples

5 2

Bob

0 0

?

1 100

Alice