题目描述
Problem Description
Iori's latest obsession is pyramids.
Iori has a large number of spherical stones with a radius of $ 1 $. Not satisfied with the color of the stones, Iori painted all of them either black or white.
Iori plans to arrange $L\ \times\ (L+1)\ \times\ (L+2)\ /\ 6$ stones in a regular tetrahedron shape with $ L $ stones on each side, creating a pyramid-like structure. To ensure stability, she plans to place them on a wooden board with $L\ \times\ (L+1)\ /\ 2$ circular holes. However, simply arranging them is boring, so Iori decided to play the following game with her good friend Yayoi while arranging the stones.
- When arranging the stones in a regular tetrahedron, the position of the stone at the $i\ (1\ ≦\ i\ ≦\ L)$ level from the bottom, $j\ (1\ ≦\ j\ ≦\ L-i+1)$ column from the back, and $k\ (1\ ≦\ k\ ≦\ j)$ stone from the left is called position $ (i,j,k) $. Note that we consider placing $x\ (1\ ≦\ x\ ≦\ L)$ stones in the $ x $ column from the back at the bottom level.
- The two players take turns placing one stone at a time on the bottom level. There are no restrictions on the color of the stone to be placed. Iori is the first player, and Yayoi is the second player.
- Once all $L\ \times\ (L+1)\ /\ 2$ positions on the bottom level are filled, the game ends, and the result is determined as follows:
- For positions $ (i,j,k) $ from the second level to the $ L $ level, place a stone if positions $ (i-1,j,k) $, $ (i-1,j+1,k) $, and $ (i-1,j+1,k+1) $ all have stones. Repeat this process until there are no more positions to place stones. The color of the stone placed at position $ (i,j,k) $ is determined by the following rules:
- If the number of black stones at positions $ (i-1,j,k) $, $ (i-1,j+1,k) $, and $ (i-1,j+1,k+1) $ is 2 or 0, the stone is black.
- Otherwise, the stone is white.
- If the stone placed at the top is black, Iori wins; if it is white, Yayoi wins.
The game has just ended, and we are about to determine the result. Who won?
Input Format
The input is given from the standard input in the following format:
$ L $ $ N $ $ A_1 $ $ B_1 $ $ A_2 $ $ B_2 $ : $ A_N $ $ B_N $
- The first line contains two integers $L\ (2\ ≦\ L\ ≦\ 10^9)$ and $N\ (0\ ≦\ N\ ≦\ Min(1000,\ L\ \times\ (L+1)\ /\ 2))$, separated by a space. This indicates that the stones are planned to be arranged in a regular tetrahedron with $ L $ stones on each side, and there are $ N $ black stones on the bottom level.
- The next $ N $ lines contain information about the positions of the black stones. The $i\ (1\ ≦\ i\ ≦\ N)$ line contains two integers $A_i\ (1\ ≦\ A_i\ ≦\ L)$ and $B_i\ (1\ ≦\ B_i\ ≦\ A_i)$. This indicates that a black stone is placed at position $ (1,A_i,B_i) $. Note that the same position information is not given more than once.
Output Format
Output Iori if Iori wins, or Yayoi if Yayoi wins, on one line. Ensure a newline at the end of the output.
Sample Input and Output
Sample Input #1
2 2
2 1
1 1
Sample Output #1
Iori
Sample Input #2
3 0
Sample Output #2
Yayoi
Notes/Hints
None
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分