Grid Game 2
문제
You are playing “Grid Game 2” with your friend. There is a grid with rows (numbered from to ) and columns (numbered from to ). The cell at row and column is denoted as .
Each cell can have a colour of either black or white. Initially, there are exactly black cells (numbered from to ). Black cell is located at . The rest of the cells are white.
You and your friend will alternately take turn playing on this grid, and you are playing in the first turn. In one turn, a player will choose a black cell , then toggle cells for all 0 ≤ x, y < \min(r, c). If a cell is toggled, then the cell becomes black if it was a white cell, and the cell becomes white if it was a black cell.
For example, the following illustration shows how the grid changes after a player chooses a black cell in their turn.
A player who is unable to play on their turn, i.e. no remaining black cells, loses the game, and the opposing player wins the game. If you and your friend are playing optimally, determine who will win the game.
입력
The first line consists of an integer (1 ≤ N ≤ 200\, 000).
Each of the next lines consists of two integers (1 ≤ R_i , C_i ≤ 10^9). For 1 ≤ i < j ≤ N, .
출력
Output FIRST if you will win the game, or SECOND otherwise.
예제
예제 1
2 2 3 2 4
FIRST
예제 2
1 2 2
SECOND
예제 3
13 1 1 1 4 1 5 2 1 2 4 2 5 4 1 4 2 4 4 5 1 5 2 5 4 5 5
SECOND