시간 제한 | 메모리 제한 | 제출 | 정답 | 맞은 사람 | 정답 비율 |
---|---|---|---|---|---|
6 초 | 256 MB | 97 | 17 | 8 | 9.302% |
Two players play a game using an array of positive integers. They make alternating moves, the player who cannot make a move loses. In one move you have to choose a prime number $p$ and a non-empty segment $[l;r]$ of the array such that all numbers in this segment are divisible by $p$, and then remove all factors $p$ from each of them. Removing all factors means that we take a number and divide it by $p$ while it is divisible.
Determine who wins if both players play optimally.
The first line contains one integer $n$ ($1 \le n \le 1000$) --- the size of array.
The second line contains the array $a_{1}, a_{2}, \ldots, a_{n}$ itself ($1 \le a_{i} \le 10^{18}$).
Print "First
" (without quotes) if first player wins and "Second
" (without quotes) otherwise.
3 2 8 4
First
3 2 12 3
Second