For Christmas, Larry the magical panda received a board game! This board game consists of a game board with
To play the game, start by placing the bamboo in square
If the bamboo is at square
, select some number from the set of numbers such that or . Discard from the set of numbers. Then, move the bamboo spaces forwards (allowed if ) or spaces backwards (allowed if ).
If a valid move exists, Larry must make a move. If it is impossible to perform a move, the bamboo is stuck, and the game is over.
Larry made the mistake of boasting to his friends that he could get the bamboo stuck using the minimum number of moves possible, when in reality he possessed no such skill. However, being a magical panda, Larry went home and calculated the minimal number of moves to get the object stuck as well as a valid sequence of moves that accomplishes this task. However, not wanting to be made fun of by his friends, he wants you to check over his work. Please help Larry by calculating the minimum number of moves to get the bamboo stuck as well as a valid sequence of moves that accomplishes this, and he will check his answer against yours!
Constraints
Input Specification
The first and only line consists of two space-separated integers
Output Specification
First, output the minimal number of moves
Then, output
If Accepted
. If only Partially Accepted
. If Wrong Answer
. After a Wrong Answer
verdict, no more test cases will run and judging will terminate.
Your overall score is the minimum number of points achieved over all test cases.
Sample Input 1
5 4
Sample Output 1
2
-2
1
Explanation for Sample Output 1
Initially, the object starts at space
After the first move, the object moves to space
After the second move, the object moves to space
It can now be shown that no more moves can be made and the object is stuck after
Sample Input 2
8 8
Sample Output 2
4
-4
-2
-1
3
Sample Input 3
1 1
Sample Output 3
0
Comments