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)

#include<cstdio>
#include<cstring>
#include<algorithm>
#define fo(i,a,b) for(int i=a;i<=b;i++)
#define fd(i,a,b) for(int i=a;i>=b;i--)
using namespace std;
inline int read() {
	int x=0,f=1;char ch=getchar();
	while(ch<'0'||ch>'9') f=(ch=='-')?-1:1,ch=getchar();
	while(ch>='0'&&ch<='9') x=10*x+(ch-'0'),ch=getchar();return x;
}
const int N=1e5+50;
int a[N],n,s0,s1;
int gcd(int x,int y) {return !y?x:gcd(y,x%y);}
bool dfs(int x) {
	int sum=0,flag=0;
	fo(i,1,n) if(a[i]%2) {a[i]--;break;}
	int g=a[1];
	fo(i,2,n) g=gcd(g,a[i]);
	fo(i,1,n)  {
		a[i]/=g;
		if(a[i]%2==0) sum++;
		if(a[i]==1) flag=1;
	}
	if(sum%2) return x^1;
	if(flag||n-sum!=1) return x;
	return dfs(x^1);
}
int main() {
	bool flag=0;
	n=read();
	fo(i,1,n) {
		a[i]=read(),(a[i]%2)?s1++:s0++;
		if(a[i]==1) flag=1;
	}
	if(s0%2) printf("First\n");
	else {
		if(flag||s1!=1) printf("Second\n");
		else if(dfs(1)) printf("First\n");
		else printf("Second\n");
	}
	return 0;
}