#D11412. Array Game
Array Game
Array Game
Problem statement
There is a positive integer sequence of length .
Consider the following game, which uses this sequence and is played by players on the play and the play.
- Alternately select one of the following operations for the first move and the second move.
- Select a positive term in the sequence for and decrement its value by .
- When all terms in the sequence are positive, decrement the values of all terms by .
The one who cannot operate first is the loser.
When players act optimally, ask for the first move or the second move.
Constraint
- All inputs are integers
input
Input is given from standard input in the following format.
output
Output First
when the first move wins, and output Second
when the second move wins.
Input example 1
2 1 2
Output example 1
First
The first move has to reduce the value of the term by first, and then the second move has to reduce the value of the term by .
If the first move then decrements the value of the term by , the value of all terms in the sequence will be , and the second move will not be able to perform any operations.
Input example 2
Five 3 1 4 1 5
Output example 2
Second
Input example 3
8 2 4 8 16 32 64 128 256
Output example 3
Second
Input example 4
3 999999999 1000000000 1000000000
Output example 4
First
Example
Input
2 1 2
Output
First
inputFormat
inputs are integers
input
Input is given from standard input in the following format.
outputFormat
output
Output First
when the first move wins, and output Second
when the second move wins.
Input example 1
2 1 2
Output example 1
First
The first move has to reduce the value of the term by first, and then the second move has to reduce the value of the term by .
If the first move then decrements the value of the term by , the value of all terms in the sequence will be , and the second move will not be able to perform any operations.
Input example 2
Five 3 1 4 1 5
Output example 2
Second
Input example 3
8 2 4 8 16 32 64 128 256
Output example 3
Second
Input example 4
3 999999999 1000000000 1000000000
Output example 4
First
Example
Input
2 1 2
Output
First
样例
2
1 2
First