#P4136. Unvisited Cells Game

    ID: 17384 Type: Default 1000ms 256MiB

Unvisited Cells Game

Unvisited Cells Game

Two players, Xiaoming and Xiaohong, play a game on an \( n \times n \) board. Initially, a stone is placed in the top-left corner of the board. In each turn, a player moves the stone one step in one of the four directions: up, down, left, or right. However, the stone can only be moved to a cell that has not been visited before. The players alternate moves, with Xiaoming moving first. The game ends when the current player cannot make a legal move, and that player loses.

Assuming both players play optimally, determine who will win the game.

Hint: Notice that the board is bipartite. When the board is completely traversed, the total number of moves is \( n^2 - 1 \). If this number is odd, then the first player makes the last move, otherwise the second player does. Thus, if \( n \) is even, the answer is "First", and if \( n \) is odd, the answer is "Second".

inputFormat

The input consists of a single integer \( n \) (1 \( \leq n \leq 10^9 \)), which represents the size of the board.

For example:

3

outputFormat

Output a single line that contains either "First" if the first player wins under optimal play, or "Second" otherwise.

For example:

Second

sample

1
Second