stablegradients/pie-gem5-bysrc huggingface dataset:
// Original C++ solution (slower):
//by yjz

#include<bits/stdc++.h>

using namespace std;

#define FF first

#define SS second

#define PB push_back

#define MP make_pair

#define bged(v) (v).begin(),(v).end()

#define foreach(it,s) for(__typeof((s).begin()) it=(s).begin();it!=(s).end();it++)

typedef long long ll;

const int Imx=2147483647;

const ll Lbig=2e18;

const int mod=1e9+7;

//My i/o stream

struct fastio

{

	char s[100000];

	int it,len;

	fastio(){it=len=0;}

	inline char get()

	{

		if(it<len)return s[it++];it=0;

		len=fread(s,1,100000,stdin);

		if(len==0)return EOF;else return s[it++];

	}

	bool notend()

	{

		char c=get();

		while(c==' '||c=='\n')c=get();

		if(it>0)it--;

		return c!=EOF;

	}

}_buff;

#define geti(x) x=getnum()

#define getii(x,y) geti(x),geti(y)

#define getiii(x,y,z) getii(x,y),geti(z)

#define puti(x) putnum(x),putchar(' ')

#define putii(x,y) puti(x),puti(y)

#define putiii(x,y,z) putii(x,y),puti(z)

#define putsi(x) putnum(x),putchar('\n')

#define putsii(x,y) puti(x),putsi(y)

#define putsiii(x,y,z) putii(x,y),putsi(z)

inline ll getnum()

{

	ll r=0;bool ng=0;char c;c=_buff.get();

	while(c!='-'&&(c<'0'||c>'9'))c=_buff.get();

	if(c=='-')ng=1,c=_buff.get();

	while(c>='0'&&c<='9')r=r*10+c-'0',c=_buff.get();

	return ng?-r:r;

}

template<class T> inline void putnum(T x)

{

	if(x<0)putchar('-'),x=-x;

	register short a[20]={},sz=0;

	while(x)a[sz++]=x%10,x/=10;

	if(sz==0)putchar('0');

	for(int i=sz-1;i>=0;i--)putchar('0'+a[i]);

}

inline char getreal(){char c=_buff.get();while(c==' '||c=='\n')c=_buff.get();return c;}

int n,a[100111];

bool solve()

{

	ll sum=0;

	bool has1=0;

	int cnt1=0;

	for(int i=1;i<=n;i++)

	{

		sum+=a[i]-1;

		if(a[i]==1)has1=1;

		if(a[i]&1)cnt1++;

	}

	if(has1)return sum%2;

	if((n-cnt1)%2==1)return 1;

	if(cnt1==1)

	{

		int g=0;

		for(int i=1;i<=n;i++)

		{

			if(a[i]&1)a[i]--;

			g=__gcd(g,a[i]);

		}

		for(int i=1;i<=n;i++)a[i]/=g;

		return solve()^1;

	}

	return 0;

}

int main()

{

	geti(n);

	for(int i=1;i<=n;i++)

	{

		geti(a[i]);

	}

	if(solve())puts("First");else puts("Second");

	return 0;

}

// Optimized solution to the same problem (faster):
#include<cstdio>

#define sev en

using namespace std;

#define N 100010



int a[N],cnt[2],n;



int gcd(int a,int b){

	if(b == 0)

		return a;

	return gcd(b,a % b);

}



int dg(){

	for(int i = 1;i <= n;i++)

		if(a[i] & 1)

			a[i]--;

	cnt[0] = cnt[1] = 0;

	int w = a[1];

	for(int i = 2;i <= n;i++)

		w = gcd(w,a[i]);

	for(int i = 1;i <= n;i++)

		cnt[(a[i] /= w) & 1]++;

	if(cnt[0] & 1)

	return 1;

	else if(cnt[1] > 1)

	return 0;

	else{

		for(int i = 1;i <= n;i++)

		if(a[i] == 1)

		return cnt[0] & 1 ? 1 : 0;

		return dg() ^ 1;

	}

}



int main(){

	scanf("%d",&n);

	for(int i = 1;i <= n;i++){ 

		scanf("%d",&a[i]);

		cnt[a[i] & 1]++;

	}

	if(cnt[0] & 1)

	printf("First");

	else if(cnt[1] > 1)

	printf("Second");

	else{

		for(int i = 1;i <= n;i++)

		if(a[i] == 1){

			printf(cnt[0] & 1 ? "First" : "Second");

			return 0;

		}

		if(dg() ^ 1)

		printf("First");

		else

		printf("Second");

	}

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<cstdio>

#include<iostream>

using namespace std;

int a[100010];

int n;

int gcd(int a,int b)

{

	return b==0?a:gcd(b,a%b);

}

bool dg()

{

	long long sum=0;

	bool ex=0;

	int num=0;

	for (int i=1;i<=n;i++)

	{

		sum+=a[i]-1;

		if (a[i]==1) ex=1;

		if (a[i]&1) num++;

	}

	if (ex) return sum%2;

	if ((n-num)%2) return 1;

	if (num==1)

	{

		int g=0;

		for (int i=1;i<=n;i++)

			if (a[i]&1) a[i]--;

		for (int i=1;i<=n;i++)

			g=gcd(g,a[i]);

		for (int i=1;i<=n;i++)

			a[i]/=g;

		return dg()^1;

	}

	return 0;

		

}

int main()

{

	scanf("%d",&n);

	for (int i=1;i<=n;i++)

		scanf("%d",&a[i]);

	if (dg()) printf("First");

		else printf("Second");

}

// Optimized solution to the same problem (faster):
#include<cstdio>

#define sev en

using namespace std;

#define N 100010



int a[N],cnt[2],n;



int gcd(int a,int b){

	if(b == 0)

		return a;

	return gcd(b,a % b);

}



int dg(){

	for(int i = 1;i <= n;i++)

		if(a[i] & 1)

			a[i]--;

	cnt[0] = cnt[1] = 0;

	int w = a[1];

	for(int i = 2;i <= n;i++)

		w = gcd(w,a[i]);

	for(int i = 1;i <= n;i++)

		cnt[(a[i] /= w) & 1]++;

	if(cnt[0] & 1)

	return 1;

	else if(cnt[1] > 1)

	return 0;

	else{

		for(int i = 1;i <= n;i++)

		if(a[i] == 1)

		return cnt[0] & 1 ? 1 : 0;

		return dg() ^ 1;

	}

}



int main(){

	scanf("%d",&n);

	for(int i = 1;i <= n;i++){ 

		scanf("%d",&a[i]);

		cnt[a[i] & 1]++;

	}

	if(cnt[0] & 1)

	printf("First");

	else if(cnt[1] > 1)

	printf("Second");

	else{

		for(int i = 1;i <= n;i++)

		if(a[i] == 1){

			printf(cnt[0] & 1 ? "First" : "Second");

			return 0;

		}

		if(dg() ^ 1)

		printf("First");

		else

		printf("Second");

	}

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

#include <cstdio>

using namespace std;

int n,a[100001],odd,sum;

int gcd(int x,int y){

	if (!y) return x;

	return gcd(y,x%y);

}

int f(){

	int o=0,e=0,i,g;

	for (i=1;i<=n;++i)

		if (a[i]&1){

			++o;

			odd=i;

		}else ++e;

	if (o==1&&a[odd]!=1){

		--a[odd];

		g=a[1];

		for (i=2;i<=n;++i) g=gcd(g,a[i]);

		for (i=1;i<=n;++i) a[i]/=g;

		return 1-f();

	}else{

		for (i=1;i<=n;++i) sum+=a[i];

		if ((sum+n)&1) return 1;

		else return 0;;

	}

}

void read(int& x){

    x=0;

    int y=1;

    char ch=getchar();

    while (ch<'0'||ch>'9'){

        if (ch=='-') y=-1;

        ch=getchar();

    }

    while (ch>='0'&&ch<='9'){

        x=x*10+ch-'0';

        ch=getchar();

    }

    x=x*y;

}

int main(){

	int i;

	read(n);

	for (i=1;i<=n;++i) read(a[i]);

	if (f()) printf("First\n");

	else printf("Second\n");

	return 0;

}

// Optimized solution to the same problem (faster):
#include<cstdio>

#define sev en

using namespace std;

#define N 100010



int a[N],cnt[2],n;



int gcd(int a,int b){

	if(b == 0)

		return a;

	return gcd(b,a % b);

}



int dg(){

	for(int i = 1;i <= n;i++)

		if(a[i] & 1)

			a[i]--;

	cnt[0] = cnt[1] = 0;

	int w = a[1];

	for(int i = 2;i <= n;i++)

		w = gcd(w,a[i]);

	for(int i = 1;i <= n;i++)

		cnt[(a[i] /= w) & 1]++;

	if(cnt[0] & 1)

	return 1;

	else if(cnt[1] > 1)

	return 0;

	else{

		for(int i = 1;i <= n;i++)

		if(a[i] == 1)

		return cnt[0] & 1 ? 1 : 0;

		return dg() ^ 1;

	}

}



int main(){

	scanf("%d",&n);

	for(int i = 1;i <= n;i++){ 

		scanf("%d",&a[i]);

		cnt[a[i] & 1]++;

	}

	if(cnt[0] & 1)

	printf("First");

	else if(cnt[1] > 1)

	printf("Second");

	else{

		for(int i = 1;i <= n;i++)

		if(a[i] == 1){

			printf(cnt[0] & 1 ? "First" : "Second");

			return 0;

		}

		if(dg() ^ 1)

		printf("First");

		else

		printf("Second");

	}

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>



using namespace std;



#define ll long long

#define ld long double

#define pll pair <ll , ll>



#define pb push_back

#define pf push_front

#define pob pop_back

#define pof pop_front

#define mp make_pair



#define X first

#define Y second



#define LB(x) ((x) & -(x))

#define BIT(a , b) (((a)>>(b)) & 1)



const ll MAXN=1e5+10;

const ll MAX_LOG=40;



ll a[MAXN];



ll n;



ll solve()

{

    ll e=0 , z=0;



    for(ll i=1;i<=n;i++)

    {

        e+=(a[i]%2==0);

        z+=(a[i]&1 && a[i]>1);

    }



    if (e&1)

    {

        return 1;

    }



    if (e==n-1 && z==1)

    {

        ll g=0;



        for(ll i=1;i<=n;i++)

        {

            if (a[i]&1)

            {

                a[i]--;

            }



            if (g==0)

            {

                g=a[i];

            }

            else

            {

                g=__gcd(g , a[i]);

            }

        }



        for(ll i=1;i<=n;i++)

        {

            a[i]/=g;

        }



        return 1-solve();

    }



    return 0;

}



int main()

{

	ios_base :: sync_with_stdio(false);

	cin.tie(0);



	cin>>n;



	for(ll i=1;i<=n;i++)

    {

        cin>>a[i];

    }



	if (n==1)

    {

        if (n&1)

        {

            cout<<"Second";

        }

        else

        {

            cout<<"First";

        }



        return 0;

    }



	if (solve())

    {

        cout<<"First";

    }

    else

    {

        cout<<"Second";

    }

}


// Optimized solution to the same problem (faster):
#include<cstdio>

#define sev en

using namespace std;

#define N 100010



int a[N],cnt[2],n;



int gcd(int a,int b){

	if(b == 0)

		return a;

	return gcd(b,a % b);

}



int dg(){

	for(int i = 1;i <= n;i++)

		if(a[i] & 1)

			a[i]--;

	cnt[0] = cnt[1] = 0;

	int w = a[1];

	for(int i = 2;i <= n;i++)

		w = gcd(w,a[i]);

	for(int i = 1;i <= n;i++)

		cnt[(a[i] /= w) & 1]++;

	if(cnt[0] & 1)

	return 1;

	else if(cnt[1] > 1)

	return 0;

	else{

		for(int i = 1;i <= n;i++)

		if(a[i] == 1)

		return cnt[0] & 1 ? 1 : 0;

		return dg() ^ 1;

	}

}



int main(){

	scanf("%d",&n);

	for(int i = 1;i <= n;i++){ 

		scanf("%d",&a[i]);

		cnt[a[i] & 1]++;

	}

	if(cnt[0] & 1)

	printf("First");

	else if(cnt[1] > 1)

	printf("Second");

	else{

		for(int i = 1;i <= n;i++)

		if(a[i] == 1){

			printf(cnt[0] & 1 ? "First" : "Second");

			return 0;

		}

		if(dg() ^ 1)

		printf("First");

		else

		printf("Second");

	}

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):


// In the name of God

#include <bits/stdc++.h>



using namespace std;

#define Size(x) ((int)(x).size())

#define pb push_back

typedef long long ll;

typedef long double ld;

typedef pair<int,int>pii;

const int INF = 1e9 + 10;

const int MN = 1e5 + 10;



int n , arr[MN];



int main()

{

	ios_base :: sync_with_stdio(false) ,cin.tie(0) , cout.tie(0);

	cin >> n;

	for(int i=0;i<n;++i) cin >> arr[i];

	bool fl = false;

	if(n == 1){

		if(arr[0]&1) cout << "Second\n";

		else cout << "First\n";

		return 0;

	}

	while(1){

		if(*min_element(arr , arr+n) == 1){

			ll sm = 0;

			for(int i=0;i<n;++i) sm += arr[i];

			if((sm-n)%2){

				if(!fl) cout << "First\n";

				else cout << "Second\n";

			}else{

				if(!fl) cout << "Second\n";

				else cout << "First\n";

			}

			return 0;

		}

		int cnt = 0;

		for(int i=0;i<n;++i) if(arr[i]%2 == 0) ++cnt;

		if(cnt&1){

			if(fl) cout << "Second\n";

			else cout << "First\n";

			return 0;

		}else if(n-cnt > 1){

			if(fl) cout << "First\n";

			else cout << "Second\n";

			return 0;

		}

		if(*max_element(arr , arr+n) == 1){

			if(!fl) cout << "Second\n";

			else cout << "First\n";

			return 0;

		}

		for(int i=0;i<n;++i) if(arr[i]&1) arr[i]--;

		int g = -1;

		for(int i=0;i<n;++i){

			if(g == -1) g = arr[i];

			else g = __gcd(g , arr[i]);

		}

		for(int i=0;i<n;++i) arr[i]/=g;

		fl = !fl;

	}

	return 0;

}


// Optimized solution to the same problem (faster):
#include<cstring>

#include<cmath>

#include<cstdio>

#include<algorithm>

using namespace std;

int a[100010],n;

inline int read(void)

{

	int x=0,f=1;

     char ch=getchar();

     while(ch>'9'||ch<'0'){

       if(ch=='-') f=-1;

       ch=getchar(); }

     while(ch>='0'&&ch<='9'){

       x=x*10+ch-'0';

       ch=getchar();}

     return x*f;

}

int gcd(int a,int b)

{

     return (b==0)?a:gcd(b,a%b);

}

bool pd()

{

	 long long sum=0;

	 int ex=0,tot=0;

	 for(int i=1;i<=n;++i)

	 {

			sum+=a[i]-1;

			if(a[i]&1) tot++;

			if(a[i]==1) ex=1;

	 }

	 if(ex) return sum%2;

	 if((n-tot)%2) return 1;

	 if(tot==1)

	 {

			int g=0;

			for(int i=1;i<=n;++i) if(a[i]&1) a[i]--;

			for(int i=1;i<=n;++i) g=gcd(g,a[i]);

			for(int i=1;i<=n;++i) a[i]/=g;

			return pd()^1;

	 }

	 return 0;

}

int main()

{

	n=read();

	for(int i=1;i<=n;++i) a[i]=read();

	if(pd()) puts("First");

 	else puts("Second");

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
//#pragma GCC optimize("O3")

#include <bits/stdc++.h>



using namespace std;



typedef long long ll;



const int N = (int) 1e5 + 5;

const int mod = (int) 1e9 + 7;



inline void scan (int &a) {

        a = 0;

        char c = getchar ();

        while (c < 48 || c > 57) {

                c = getchar ();

        }

        while (c > 47 && c < 58) {

                a = (a << 1) + (a << 3) + c - 48;

                c = getchar ();

        }

}



int n, a[N];



int calc (int player) {

        int x = 0;

        for (int i = 1; i <= n; i++) {

                x += a[i] & 1;

        }

        x = n - x;

        if (x & 1) {

                return player;

        } else if (x + 1 < n) {

                return player ^ 1;

        } else {

                int g = 0;

                for (int i = 1; i <= n; i++) {

                        if (a[i] & 1) {

                                if (a[i] == 1) {

                                        return player ^ 1;

                                }

                                a[i]--;

                        }

                        g = __gcd (g, a[i]);

                }

                for (int i = 1; i <= n; i++) {

                        a[i] /= g;

                }

                return calc (player ^ 1);

        }

}



inline void solve () {

        scan (n);

        for (int i = 1; i <= n; i++) {

                scan (a[i]);

        }

        puts ((calc (1) & 1) ? "First" : "Second");

}



int tests = 1;



int main () {

//        freopen (".in", "r", stdin);

//        freopen (".out", "w", stdout);

//        scanf ("%d", &tests);

        while (tests--) {

                solve ();

        }

        return 0;

}


// Optimized solution to the same problem (faster):
#include<cstring>

#include<cmath>

#include<cstdio>

#include<algorithm>

using namespace std;

int a[100010],n;

inline int read(void)

{

	int x=0,f=1;

     char ch=getchar();

     while(ch>'9'||ch<'0'){

       if(ch=='-') f=-1;

       ch=getchar(); }

     while(ch>='0'&&ch<='9'){

       x=x*10+ch-'0';

       ch=getchar();}

     return x*f;

}

int gcd(int a,int b)

{

     return (b==0)?a:gcd(b,a%b);

}

bool pd()

{

	 long long sum=0;

	 int ex=0,tot=0;

	 for(int i=1;i<=n;++i)

	 {

			sum+=a[i]-1;

			if(a[i]&1) tot++;

			if(a[i]==1) ex=1;

	 }

	 if(ex) return sum%2;

	 if((n-tot)%2) return 1;

	 if(tot==1)

	 {

			int g=0;

			for(int i=1;i<=n;++i) if(a[i]&1) a[i]--;

			for(int i=1;i<=n;++i) g=gcd(g,a[i]);

			for(int i=1;i<=n;++i) a[i]/=g;

			return pd()^1;

	 }

	 return 0;

}

int main()

{

	n=read();

	for(int i=1;i<=n;++i) a[i]=read();

	if(pd()) puts("First");

 	else puts("Second");

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
# include <iostream>

# include <vector>

# include <deque>

# include <math.h>

# include <set>

# include <iomanip>

# include <time.h>

# include <list>

# include <stdio.h>

# include <queue>

# include <map>

# include <algorithm>

# include <string.h>



# define ll long long

# define mk make_pair

# define sc second

# define fr first

# define pb push_back



using namespace std;



const long long N = (1e6 + 10);

const long long mod = (1e9 + 7);



int n,k,a[N],g;



int f(int sign){

    int k = 0,g = 0;

    for(int i = 1; i <= n; i ++)

        k += (a[i] % 2);



    if((n - k) & 1)

        return sign;



    if(k > 1)

        return sign ^ 1;



    else{

        for(int i = 1; i <= n; i ++){

            if(a[i] == 1)

                return sign ^ 1;



            if(a[i] & 1)

                a[i] --;

            if(g == 0)

                g = a[i];

            else

                g = __gcd(g,a[i]);

        }



        for(int i = 1; i <= n; i ++)

            a[i] /= g;



        return f(sign ^ 1);

    }

}

main () {

    scanf("%d", &n);



    for(int i = 1; i <= n; i ++)

        scanf("%d", &a[i]);



    printf(f(1) == 1 ? "First" : "Second");

}


// Optimized solution to the same problem (faster):
#include<cstring>

#include<cmath>

#include<cstdio>

#include<algorithm>

using namespace std;

int a[100010],n;

inline int read(void)

{

	int x=0,f=1;

     char ch=getchar();

     while(ch>'9'||ch<'0'){

       if(ch=='-') f=-1;

       ch=getchar(); }

     while(ch>='0'&&ch<='9'){

       x=x*10+ch-'0';

       ch=getchar();}

     return x*f;

}

int gcd(int a,int b)

{

     return (b==0)?a:gcd(b,a%b);

}

bool pd()

{

	 long long sum=0;

	 int ex=0,tot=0;

	 for(int i=1;i<=n;++i)

	 {

			sum+=a[i]-1;

			if(a[i]&1) tot++;

			if(a[i]==1) ex=1;

	 }

	 if(ex) return sum%2;

	 if((n-tot)%2) return 1;

	 if(tot==1)

	 {

			int g=0;

			for(int i=1;i<=n;++i) if(a[i]&1) a[i]--;

			for(int i=1;i<=n;++i) g=gcd(g,a[i]);

			for(int i=1;i<=n;++i) a[i]/=g;

			return pd()^1;

	 }

	 return 0;

}

int main()

{

	n=read();

	for(int i=1;i<=n;++i) a[i]=read();

	if(pd()) puts("First");

 	else puts("Second");

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>



#define PB          push_back

#define PF          push_front

#define MP          make_pair

#define FI          first

#define SE          second

#define SIZE( A )   int( ( A ).size( ) )

#define ALL( A )    ( A ).begin( ), ( A ).end( )

#define ALLR( A )   ( A ).rbegin( ), ( A ).rend( )



using namespace std;



typedef long long           ll;

typedef unsigned long long  ull;

typedef long double         lf;

typedef pair< int, int >    pii;

typedef pair< ll, ll >      pll;

typedef vector< bool >      vb;

typedef vector< lf >        vd;

typedef vector< ll >        vll;

typedef vector< int >       vi;

typedef vector< pii >       vpii;



const int MAXN = int( 1e5 )+10;

const int MOD  = int( 360 );

const int oo   = INT_MAX;



int n, odd, even, cnt;

int arr[ MAXN ];



bool reduce() {

  if( odd != 1 ) return false;

  int gcd = 0;

  for( int i = 0; i < n; ++i ) {

    if( arr[i] == 1 ) return false;

    if( arr[i]%2 ) --arr[i];

    gcd = __gcd( gcd, arr[i] );

  }

  odd = even = 0;

  for( int i = 0; i < n; ++i ) {

    arr[i] /= gcd;

    if( arr[i]%2 ) ++odd;

    else ++even;

  }

  return true;

}



int main( ) {



  #ifdef LOCAL

    freopen( "input", "r", stdin );

    //freopen( "output", "w", stdout );

  #else

    //freopen( "input", "r", stdin );

    //freopen( "output", "w", stdout );

    ios_base::sync_with_stdio( 0 );

    cin.tie( 0 );

  #endif



  while( cin >> n ) {

    even = odd = cnt = 0;

    for( int i = 0; i < n; ++i ) {

      cin >> arr[ i ];

      if( arr[i]%2 ) ++odd;

      else ++even;

    }

    while( reduce() ){ ++cnt; }

    even += cnt;

    if( even%2 ) {

      cout << "First\n";

    }

    else {

      cout << "Second\n";

    }

  }

  return 0;

}


// Optimized solution to the same problem (faster):
#include<cstring>

#include<cmath>

#include<cstdio>

#include<algorithm>

using namespace std;

int a[100010],n;

inline int read(void)

{

	int x=0,f=1;

     char ch=getchar();

     while(ch>'9'||ch<'0'){

       if(ch=='-') f=-1;

       ch=getchar(); }

     while(ch>='0'&&ch<='9'){

       x=x*10+ch-'0';

       ch=getchar();}

     return x*f;

}

int gcd(int a,int b)

{

     return (b==0)?a:gcd(b,a%b);

}

bool pd()

{

	 long long sum=0;

	 int ex=0,tot=0;

	 for(int i=1;i<=n;++i)

	 {

			sum+=a[i]-1;

			if(a[i]&1) tot++;

			if(a[i]==1) ex=1;

	 }

	 if(ex) return sum%2;

	 if((n-tot)%2) return 1;

	 if(tot==1)

	 {

			int g=0;

			for(int i=1;i<=n;++i) if(a[i]&1) a[i]--;

			for(int i=1;i<=n;++i) g=gcd(g,a[i]);

			for(int i=1;i<=n;++i) a[i]/=g;

			return pd()^1;

	 }

	 return 0;

}

int main()

{

	n=read();

	for(int i=1;i<=n;++i) a[i]=read();

	if(pd()) puts("First");

 	else puts("Second");

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

#include<cstdlib>

#include<cstring>

#include<cstdio>

#include<cmath>

#include<algorithm>

using namespace std;



const int N=100005;



int n;

int a[N];



int gcd(int x,int y){

	if (!y) return x;

	else return gcd(y,x%y);

}



bool solve(){

	int yi=0,er=0;

	for (int i=1;i<=n;i++){

		if (a[i]==1) yi++;

		if (!(a[i]&1)) er++;

	}

	if (er&1) return 1;

	if (er<n-1) return 0;

	if (yi>0) return 0;

	int g=0;

	for (int i=1;i<=n;i++){

		if (a[i]&1) a[i]--;

		g=gcd(a[i],g);

	}

	for (int i=1;i<=n;i++) a[i]/=g;

	return solve()^1;

}



int main(){

	scanf("%d",&n);

	for (int i=1;i<=n;i++) scanf("%d",&a[i]);

	if (solve()) printf("First\n");

	else printf("Second\n");

	return 0;

}

// Optimized solution to the same problem (faster):
#include<cstring>

#include<cmath>

#include<cstdio>

#include<algorithm>

using namespace std;

int a[100010],n;

inline int read(void)

{

	int x=0,f=1;

     char ch=getchar();

     while(ch>'9'||ch<'0'){

       if(ch=='-') f=-1;

       ch=getchar(); }

     while(ch>='0'&&ch<='9'){

       x=x*10+ch-'0';

       ch=getchar();}

     return x*f;

}

int gcd(int a,int b)

{

     return (b==0)?a:gcd(b,a%b);

}

bool pd()

{

	 long long sum=0;

	 int ex=0,tot=0;

	 for(int i=1;i<=n;++i)

	 {

			sum+=a[i]-1;

			if(a[i]&1) tot++;

			if(a[i]==1) ex=1;

	 }

	 if(ex) return sum%2;

	 if((n-tot)%2) return 1;

	 if(tot==1)

	 {

			int g=0;

			for(int i=1;i<=n;++i) if(a[i]&1) a[i]--;

			for(int i=1;i<=n;++i) g=gcd(g,a[i]);

			for(int i=1;i<=n;++i) a[i]/=g;

			return pd()^1;

	 }

	 return 0;

}

int main()

{

	n=read();

	for(int i=1;i<=n;++i) a[i]=read();

	if(pd()) puts("First");

 	else puts("Second");

	return 0;

}

// Fastest known solution for this problem: