Problem:
Score : 1000 points

Problem Statement

There are N integers written on a blackboard. The i-th integer is A_i, and the greatest common divisor of these integers is 1.

Takahashi and Aoki will play a game using these integers. In this game, starting from Takahashi the two player alternately perform the following operation:

Select one integer on the blackboard that is not less than 2, and subtract 1 from the integer.

Then, divide all the integers on the black board by g, where g is the greatest common divisor of the integers written on the blackboard.

The player who is left with only 1s on the blackboard and thus cannot perform the operation, loses the game.
Assuming that both players play optimally, determine the winner of the game.

Constraints

1 ≦ N ≦ 10^5

1 ≦ A_i ≦ 10^9

The greatest common divisor of the integers from A_1 through A_N is 1.

Input

The input is given from Standard Input in the following format:

N
A_1 A_2 … A_N

Output

If Takahashi will win, print First. If Aoki will win, print Second.

Sample Input 1

3
3 6 7

Sample Output 1

First

Takahashi, the first player, can win as follows:

Takahashi subtracts 1 from 7. Then, the integers become: (1,2,2).

Aoki subtracts 1 from 2. Then, the integers become: (1,1,2).

Takahashi subtracts 1 from 2. Then, the integers become: (1,1,1).

Sample Input 2

4
1 2 4 8

Sample Output 2

First

Sample Input 3

5
7 8 8 8 8

Sample Output 3

Second

Solution in C++14 (GCC 5.4.1) (judge verdict: Accepted)

/*
            AtCoder010-AGC-D

    Let's consider some cases:

    1) If the array has odd number of even integers, the player whose turn is now
can win by performing the operation on one of the even integers(thus, GCD won't change the parities)

    2) If 1) doesn't happen and there are at least two odd numbers, the player whose turn will come next will win,
since no matter what the player whose turn is now will do, the other player can undo it.

    3) If 1) and 2) don't happen and we have at least an one, the player whose turn will come next will win, because the sum of
the possible drops is even and the player currently at turn won't have any remaining move.

    If none of the cases above happen, we have only 1 odd integer and (n-1) even integers, so we need to perform the operation
on the odd integer, and we will solve the game recursively for the next player.

    Since the GCD will be at least 2, the complexity will therefore be O(n log valmax).

*/
#include<bits/stdc++.h>
using namespace std;
int n, v[100002];
int winn(int turn)
{
    int odd = 0, even = 0;
    for(int i = 1; i <= n; ++i)
    {
        if(v[i] % 2 == 0)
            ++even;
        else
            if(v[i] == 1)
                ++odd;
    }
    if(even % 2 == 1)
        return turn;
    if(even < n - 1)
        return 3 - turn;
    if(odd)
        return 3 - turn;
    for(int i = 1; i <= n; ++i)
        if(v[i] % 2 == 1)
            --v[i];
    int cmm = v[1];
    for(int i = 1; i <= n; ++i)
        cmm = __gcd(cmm, v[i]);
    for(int i = 1; i <= n; ++i)
        v[i] /= cmm;
    return winn(3 - turn);
}
int main()
{
    cin >> n;
    for(int i = 1; i <= n; ++i)
        cin >> v[i];
    int tu = winn(1);
    if(tu == 1)
        cout << "First";
    else
        cout << "Second";
    return 0;
}