Statement
Coco likes chess. One day Coco thought the movement of a knight is too simple, so he invented a fairy piece called a K-knight. A knight can move two squares in one direction (horizontal or vertical) and then one square in a perpendicular direction. A K-knight can move squares in one direction and then squares in a perpendicular direction.
The knight game is a one-player game played on an infinite grid of chocolate. Initially, a knight is placed at the origin . Every turn, the player moves the knight according to its movement rule, and eats the previous chocolate cell the knight was on. The player cannot move the knight to a cell with no chocolate. The game ends when the player cannot move the knight anymore.
Hanbyeol just lost a game of Rock-Paper-Scissors with Coco, so she has to play a knight game on a 99% Cacao chocolate board. If the knight is replaced with a K-knight in this game, find out how to minimize the number of moves until the game ends.
Input
The first line of input contains the integers and separated by space, which define the movement rules of a K-knight. ()
Output
Output the number of moves on the first line. Then, over the next lines, output the and coordinates of the K-knight after each of the moves.