stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#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";

    }

}


// Faster C++ solution for the same problem (measured speedup: 5.357917789097343x):
#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;

}
// Slower C++ solution:


// 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;

}


// Faster C++ solution for the same problem (measured speedup: 5.444643144536746x):
#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;

}
// Slower C++ solution:
//#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;

}


// Faster C++ solution for the same problem (measured speedup: 5.291237745260891x):
#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;

}
// Slower C++ solution:
# 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");

}


// Faster C++ solution for the same problem (measured speedup: 5.3104953485219895x):
#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;

}
// Slower C++ solution:
#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;

}


// Faster C++ solution for the same problem (measured speedup: 5.439018876705638x):
#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;

}
// Slower C++ solution:
#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;

}

// Faster C++ solution for the same problem (measured speedup: 5.310347430842062x):
#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;

}
// Slower C++ solution:
#include<cmath>

#include<math.h>

#include<ctype.h>

#include<algorithm>

#include<bitset>

#include<cassert>

#include<cctype>

#include<cerrno>

#include<cfloat>

#include<ciso646>

#include<climits>

#include<clocale>

#include<complex>

#include<csetjmp>

#include<csignal>

#include<cstdarg>

#include<cstddef>

#include<cstdio>

#include<cstdlib>

#include<cstring>

#include<ctime>

#include<cwchar>

#include<cwctype>

#include<deque>

#include<exception>

#include<fstream>

#include<functional>

#include<iomanip>

#include<ios>

#include<iosfwd>

#include<iostream>

#include<istream>

#include<iterator>

#include<limits>

#include<list>

#include<locale>

#include<map>

#include<memory>

#include<new>

#include<numeric>

#include<ostream>

#include<queue>

#include<set>

#include<sstream>

#include<stack>

#include<stdexcept>

#include<streambuf>

#include<string>

#include<typeinfo>

#include<utility>

#include<valarray>

#include<vector>

#include<string.h>

#include<stdlib.h>

#include<stdio.h>

using namespace std;

int n,a[100010];

int gcd(int x,int y)

{

	if (!y)

	{

		return x;

	}

	else

	{

		return gcd(y,x%y);

	}

}

bool nim()

{

	long long s=0;

	bool f=false;

	int cnt=0;

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

	{

		s+=a[i]-1;

		if (a[i]==1)

		{

			f=true;

		}

		if (a[i]&1)

		{

			cnt++;

		}

	}

	if (f)

	{

		return s%2;

	}

	if ((n-cnt)%2)

	{

		return true;

	}

	if (cnt==1)

	{

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

		{

			if (a[i]&1)

			{

				a[i]--;

				break;

			}

		}

		int g=a[1];

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

		{

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

		}

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

		{

			a[i]/=g;

		}

		return !(nim());

	}

	return false;

}

int main()

{

	scanf("%d",&n);

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

	{

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

	}

	if (nim())

	{

		puts("First");

	}

	else

	{

		puts("Second");

	}

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.30669438978863x):
#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;

}
// Slower C++ solution:
#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;

}

// Faster C++ solution for the same problem (measured speedup: 5.293962410187037x):
#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;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

#define MAXN 100000+10

int n,a[MAXN];

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

bool f(){

    long long sum=0;

    bool flag=0;

    int num=0;

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

        sum+=a[i]-1;

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

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

    }

    if(flag)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 f()^1;

    }

    return 0;



}

int main(){

    scanf("%d",&n);

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

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

    else printf("Second");

}

// Faster C++ solution for the same problem (measured speedup: 5.308902893180047x):
#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;

}
// Slower C++ solution:
#include <iostream>

#include <vector>

#include <algorithm>

#include <numeric>

#define repeat(i,n) for (int i = 0; (i) < int(n); ++(i))

#define whole(f,x,...) ([&](decltype((x)) whole) { return (f)(begin(whole), end(whole), ## __VA_ARGS__); })(x)

using ll = long long;

using namespace std;

int gcd(int a, int b) { while (a) { b %= a; swap(a, b); } return b; }

bool solve(int n, vector<int> & a) {

    ll sum = whole(accumulate, a, 0ll);

    bool is_first = (sum - n) % 2;

    int even = whole(count_if, a, [&](int ai) { return ai % 2 == 0; });

    auto odd = whole(find_if,  a, [&](int ai) { return ai % 2 == 1; });

    if (not is_first and even == n-1 and *odd != 1) {

        -- (*odd);

        int d = a[0]; repeat (i,n) d = gcd(d, a[i]);

        repeat (i,n) a[i] /= d;

        return not solve(n, a);

    } else {

        return is_first;

    }

}

int main() {

    int n; cin >> n;

    vector<int> a(n); repeat (i,n) cin >> a[i];

    cout << (solve(n, a) ? "First" : "Second") << endl;

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.359987808910488x):
#include<cstdio>

#include<algorithm>

using namespace std;

const int MAXN=100005;



int n,A[MAXN];



bool solve()

{

	if(n==1)

		return false;

	int cnt[2]={0,0};

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

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

	if(cnt[0]&1)

		return true;

	if((cnt[0]&1)==0&&cnt[1]>=2)

		return false;

	int pos=-1;

	for(int i=1;i<=n&&pos==-1;i++)

		if(A[i]&1)

			pos=i;

	if(A[pos]==1)

	{

		int sum=0;

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

			sum^=(A[i]-1)&1;

		return sum;

	}

	A[pos]--;

	int g=A[1];

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

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

	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())

		puts("First");

	else

		puts("Second");

	

	return 0;

}