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


#include <bits/stdc++.h>

using namespace std;



void Sieve(int n)

{

	bool prime[n+1];

	int c=0;

	memset(prime, true, sizeof(prime));



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

	{

		if (prime[p] == true)

		{

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

				prime[i] = false;

		}

	}

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

	if (prime[p])

		c++;

		cout<<c<<endl;

}



int main()

{

	int n;

	while(cin>>n){

        Sieve(n);

	}



	return 0;

}

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

using namespace std;

#define MAX 1000000

int prime[MAX];

bool is_prime[MAX];

int sieve(int n){   //埃氏?

   int p=0;

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

    is_prime[i]=true;

    is_prime[0]=is_prime[1]=false;

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

    if(is_prime[i]){

        prime[p++]=i;    //??素数的个数和素数的?

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

            is_prime[j]=false;

    }

   }

   return p;

}

int main()

{

  int num;

  while(scanf("%d",&num)!=EOF){

   printf("%d\n",sieve(num));

  }

  return 0;

}

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

using namespace std;



void Sieve(int n)

{

	bool prime[n+1];

	int c=0;

	memset(prime, true, sizeof(prime));

	int x=sqrt(n*1.0)+2;



	for (int p=2; p<=x; p++)

	{

		if (prime[p] == true)

		{

			for (int i=p*p; i<=n; i+=p)

				{

				    prime[i] = false;

				}



		}

	}

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

	if (prime[p])

		c++;

		cout<<c<<endl;

}



int main()

{

	int n;

	while(cin>>n){

        Sieve(n);

	}



	return 0;

}

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

using namespace std;

#define MAX 1000000

int prime[MAX];

bool is_prime[MAX];

int sieve(int n){   //埃氏?

   int p=0;

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

    is_prime[i]=true;

    is_prime[0]=is_prime[1]=false;

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

    if(is_prime[i]){

        prime[p++]=i;    //??素数的个数和素数的?

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

            is_prime[j]=false;

    }

   }

   return p;

}

int main()

{

  int num;

  while(scanf("%d",&num)!=EOF){

   printf("%d\n",sieve(num));

  }

  return 0;

}

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

using namespace std;



void SieveOfEratosthenes(int n)

{

    int c = 0;

    bool prime[n+1];

    memset(prime, true, sizeof(prime));



    for (int p=2; p*p<=n; p++)

    {

        if (prime[p] == true)

        {

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

                prime[i] = false;

        }

    }



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

       if (prime[p]){

            c++;

       }



       cout<<c<<endl;



}



// Driver Program to test above function

int main()

{

    int n;

    while(cin>>n)

    {

        SieveOfEratosthenes(n);

    }



    return 0;

}

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

using namespace std;

#define MAX 1000000

int prime[MAX];

bool is_prime[MAX];

int sieve(int n){   //埃氏?

   int p=0;

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

    is_prime[i]=true;

    is_prime[0]=is_prime[1]=false;

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

    if(is_prime[i]){

        prime[p++]=i;    //??素数的个数和素数的?

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

            is_prime[j]=false;

    }

   }

   return p;

}

int main()

{

  int num;

  while(scanf("%d",&num)!=EOF){

   printf("%d\n",sieve(num));

  }

  return 0;

}

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

#include<string.h>

using namespace std;

int pNum;

bool IsPrime[1000010];

int Prime[1000010];

int GetPrime(int n){

    memset(IsPrime,true,sizeof(IsPrime));

    IsPrime[0]=IsPrime[1]=false;

    pNum=0;

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

        if(IsPrime[i])Prime[++pNum]=i;

        for(int j=1;j<=pNum&&Prime[j]*i<=n;j++){

            IsPrime[Prime[j]*i]=false;

            if(i%Prime[j]==0)break;

        }

    }

    return pNum;

}

int main(){

    int n;

    while(~scanf("%d",&n)){

        printf("%d\n",GetPrime(n));

    }

    return 0;

}

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

using namespace std;

#define MAX 1000000

int prime[MAX];

bool is_prime[MAX];

int sieve(int n){   //埃氏?

   int p=0;

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

    is_prime[i]=true;

    is_prime[0]=is_prime[1]=false;

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

    if(is_prime[i]){

        prime[p++]=i;    //??素数的个数和素数的?

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

            is_prime[j]=false;

    }

   }

   return p;

}

int main()

{

  int num;

  while(scanf("%d",&num)!=EOF){

   printf("%d\n",sieve(num));

  }

  return 0;

}

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

using namespace std;

int main()

{

    int n;

    while(~scanf("%d",&n))

    {

        int prime[n+1];

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

            prime[i]=1;

            prime[0]=0;

            prime[1]=0;

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

             if(prime[i]==1)

        {

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

            prime[i*j]=0;

        }

        int c=0;

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

        {

            if(prime[i]==1)

                c++;

        }

        printf("%d\n",c);

    }



}

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

using namespace std;

#define MAX_N 999999+10

int prime[MAX_N];

bool is_prime[MAX_N+1];



int sieve(int n){

    int p=0;

    for(int i=0;i<=n;i++)is_prime[i]=true;

    is_prime[0]=is_prime[1]=false;

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

        if(is_prime[i]){

            prime[p++]=i;

            for(int j=2*i;j<=n;j+=i)is_prime[j]=false;

        }

    }

    return p;

}



int main(){

    int n;

    while(~scanf("%d",&n)){

        printf("%d\n",sieve(n));

    }

}

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

using namespace std;

int main(){

	int n, cnt;

	

	while(cin >> n){

		bool prime[1000000] = {false};

		prime[1] = true; //1???????????\

		

		// ??¨??????????????????????????????

		for(int j = 2; j*j <= n; j++){

			if(prime[j] == false){

				for(int k = j; k*j <= n; k++){

					prime[j*k] =true;

				}

			}

		}

		cnt = 0;

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

			if(prime[i] == false) cnt++;

		}

		

		cout << cnt << endl;

	}

}

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

using namespace std;

int main(){

	int n, cnt;	



	while(cin >> n){

		bool prime[n+1] = {false};

		prime[1] = true;

		

		// ??¨??????????????????????????????

		for(int j = 2; j*j <= n; j++){

			if(prime[j] == false){

				for(int k = j; k*j <= n; k++){

					prime[j*k] = true;

				}

			}

		}

		cnt = 0;

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

			if(prime[i] == false) cnt++;

		}

		

		cout << cnt << endl;

	}

}

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



using namespace std;



int main() {

    long NUM = 1000000;

    long n;

	long counter = 0;

	bool primeNum[NUM + 10];



	long i, ii, j, len = NUM + 10;

	

	primeNum[0] = primeNum[1] = false;

	for (i = 2; i < len; i++) primeNum[i] = true;

	

	ii = 4;

    for(i = 2; ii < NUM;) {

        if (primeNum[i]) {

            for (j = ii; j < NUM; j += i) {

                primeNum[j] = false;

            }

        }

        

        i++;

        ii = i * i;

    }

    

    while (scanf("%ld", &n) != EOF) {

        counter = 0;

        

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

            if (primeNum[i]) counter++;

        }

        

        printf("%ld\n", counter);

    }



    return 0;

}

// Optimized solution to the same problem (faster):
#include <bits/stdc++.h>

 

using namespace std;



static const long MAX = 1000000L;

 

int main() {

    vector<long> prime;

    vector<long> dp;

    bool isPrime;

    long n, m;

 

    long i, len = sqrt(MAX) + 1;

    long j, lenJ;

    long k;

     

    prime.push_back(2);

    dp.push_back(0);

	dp.push_back(0);

	dp.push_back(1);



    for (i = 3; i <= len; i += 2) {

        isPrime = true;

        lenJ = prime.size();

        k = sqrt(i) + 1;

        for (j = 0; j < lenJ; j++) {

            if (k <= prime[j]) break;



            if (i % prime[j] == 0) {

                isPrime = false;



                break;

            }

	}



        if (isPrime) prime.push_back(i);

    }



    lenJ = prime.size();

     

    while (cin >> n) {

	if (n < dp.size()) {

		cout << dp[n] << endl;



		continue;

	}

         

	m = dp.size();

        for (i = m; i <= n; i += 2) {

            isPrime = true;



            k = sqrt(i) + 1;

            for (j = 0; j < lenJ; j++) {

                if (k <= prime[j]) break;



                if (i % prime[j] == 0) {

                    isPrime = false;



                    break;

                }

            }



            if (isPrime) {

		dp.push_back(dp.back() + 1);

		dp.push_back(dp.back());

	    } else {

		dp.push_back(dp.back());

		dp.push_back(dp.back());

	    }

        }

         

        cout << dp[n] << endl;

    }

 

    return 0;

}

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

using namespace std;





int main() {



	int judge[1000000];

	for(int k=0;k<1000000;k++)judge[k]=1;

	int n,sum;

	

	while(cin>>n){

		if(n==0||n==1){

			sum = 0;

		}else{

			sum = 1;

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

				if (judge[i]==1){

					sum++;

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

						judge[i*j] = 0;

				}	

			}

		}

		

		cout << sum <<endl;

	}



	return 0;

}

// Optimized solution to the same problem (faster):
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;



int main(){

    vector<int> ns;

    int temp, max_n = 0;

    while(cin >> temp){

        ns.push_back(temp);

        max_n = max(temp, max_n);

    }

    max_n++;



    vector<bool> is_prime(max_n, true);

    vector<int> primes;

    for(ll i=2;i<max_n;i++){

        if(is_prime[i]){

            primes.push_back(i);

            for(ll j=i*i;j<max_n;j+=i){

                is_prime[j] = false;

            }

        }

    }



    for(int n: ns){

        int ans = upper_bound(primes.begin(), primes.end(), n) - primes.begin();

        cout << ans << endl;

    }



    return 0;

}

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

using namespace std;

typedef long long int ll;

const int MAX=1e5 + 10,MOD=1e9 + 7;

int N,K,A[105],mn=1e9;

int dp[MAX][2];

int f(int rem,int turn)

{

    if(rem<mn&&turn==1)return 0;

    if(rem<mn&&turn==0)return 1;

    if(dp[rem][turn]!=-1)return dp[rem][turn];

    for(int i=0;i<N;i++)

    {

        if(rem-A[i]>=0)

        if(f(rem-A[i],turn^1)==turn){

            return dp[rem][turn] = turn;

        }

    }

    return dp[rem][turn] = turn^1;

}

int main ()

{

    ios_base::sync_with_stdio(false);

    cin.tie(0);



    memset(dp,-1,sizeof dp);

    cin >> N >> K;

    for(int i=0;i<N;i++){cin>>A[i];mn = min(mn,A[i]);}

    if(f(K,0)==0){

        cout<<"First\n";

    }

    else cout<<"Second\n";

    //main();

    return 0;

}


// Optimized solution to the same problem (faster):
#include <bits/stdc++.h>



using namespace std;

typedef long long ll;



const int N = 100007;



bool f[N];

int a[1007];

int main() {

    int n, k; cin >> n >> k;



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



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

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

            if(i - a[j] >= 0) f[i] = f[i] or (!f[i - a[j]]);

        }

    }



    cout << (f[k]? "First" : "Second") << endl;

}

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

#include<map>

#include<cmath>

#include<ctime>

#include<queue>

#include<stack>

#include<cstdio>

#include<string>

#include<vector>

#include<random>

#include<cstdlib>

#include<cstring>

#include<iomanip>

#include<iostream>

#include<algorithm>

#include<unordered_map>

#define endl "\n"

#define fi first

#define se second

#define db double

#define gcd __gcd

#define pb push_back

#define mp make_pair

#define lowbit(x) (x & (-x))

#define PII  pair<int, int> 

#define all(x) x.begin(), x.end()

#define debug(x) cout << #x << " = " << x << endl

#define rep(i, a, b) for(__typeof(b) i = a; i <= (b); i++)

#define Rep(i, a, b) for(__typeof(a) i = a; i >= (b); i--)

#define FAST ios::sync_with_stdio(false); cin.tie(0); cout.tie(0)

template<class T> inline T qmin(T a, T b) { return a < b ? a : b; }

template<class T> inline T qmax(T a, T b) { return a > b ? a : b; }

typedef long long ll;

typedef unsigned long long ull;

const db eps = 1e-9;

const db PI = acos(-1);

const int inf = 0x3f3f3f3f;

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

const int maxn = (int)1e5 + 5;//remember to modify it, No RE or MLE

const ll INF = 0x3f3f3f3f3f3f3f3f;

using namespace std;



ll qpow(ll x, ll y) { ll ret = 1; for( ; y; y >>= 1, x = (x * x) % mod) if(y & 1) ret = (ret * x) % mod; return ret; }



inline int read(){

	char ch = getchar();

	int x = 0, f = 1;

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

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

		ch = getchar();

	}

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

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

		ch = getchar();

	}

	return x * f;

}



int dp[maxn];//0 必败态; 1必胜态; -1尚未确定;

int a[105];

int n, k;

int cnt = 0;



bool dfs(int now){

	if(~dp[now]) return dp[now];

	bool ret = 0;

	rep(i, 1, n){

		if(a[i] > now) break;

		if(!dfs(now - a[i])) ret = 1;

	}

	return dp[now] = ret;

}



int main()

{

	n = read(), k = read();

	rep(i, 1, n) a[i] = read();

	memset(dp, -1, sizeof dp);

	sort(a + 1, a + n + 1);

	dp[0] = 0;

	dfs(k);

	puts(dp[k] ? "First" : "Second");

	return 0;

}

// Optimized solution to the same problem (faster):
#include <bits/stdc++.h>



using namespace std;

typedef long long ll;



const int N = 100007;



bool f[N];

int a[1007];

int main() {

    int n, k; cin >> n >> k;



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



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

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

            if(i - a[j] >= 0) f[i] = f[i] or (!f[i - a[j]]);

        }

    }



    cout << (f[k]? "First" : "Second") << endl;

}

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

using namespace std;

#define  ll long long int

#define mx 1000007

ll dp[mx];

ll a[mx];



int main()

{

    ll n,k;

    cin>>n>>k;

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



    memset(dp,0,sizeof(dp));

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

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

            if(i-a[j]>=0){

                if(dp[i-a[j]]==0){

                    dp[i]=1;

                    break;

                }

            }

        }

    }

    if(dp[k]==1) cout<<"First"<<endl;

    else cout<<"Second"<<endl;

}

// Optimized solution to the same problem (faster):
#include<bits/stdc++.h>

using namespace std;

bool dp[100005];

vector <int> a;

int N, K, temp;

int main(){

	scanf("%d%d", &N, &K);

	memset(dp, 0, sizeof(dp));

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

		scanf("%d", &temp);

		a.push_back(temp);

		dp[temp] = true;

	}

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

		bool win = false;

		for(auto j : a){

			if(i - j < 0) continue;

			if(dp[i-j] == false){

				win = true;

				break;

			}

		}

		if(win) dp[i] = true;

	}

	if(dp[K]) cout <<"First"<<endl;

	else cout << "Second"<<endl;





}

// Fastest known solution for this problem:
// Original C++ solution (slower):
//       Author: Mostafa Mounir Shehab

 

#include <bits/stdc++.h>

using namespace std;

 

#define PI  acos(-1)

#define EPS (1e-10)

#define endl "\n"

#define SZ(v) (int)(v.size())

#define IO ios_base::sync_with_stdio(0), cin.tie(NULL), cout.tie(NULL), cerr.tie(NULL);

typedef long long ll;

typedef long double ld;

 

 

 

ll MOD=1e9 + 7;

ll OO=1e9 + 7;

const int N=1e5 + 10,M = 2750131 + 1;

int arr[N];

int vis[N];



int n,m,k,T,lvl,comp;

int a,b,c;



int dx[]={0,0,-1,1};

int dy[]={-1,1,0,0}; 





bool Solve(){

	

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

		bool flage = false;

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

			flage |= !vis[i-arr[j]];

			

		vis[i] = flage;

	}

	

	return vis[k];

}







int main(){

	

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

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

	IO

	cin>>n>>k;

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

		cin>>arr[i];

	sort(arr,arr+n);

	

	cout<<(Solve() ? "First" : "Second")<<endl;

	

	return 0;

}

// Optimized solution to the same problem (faster):
#include<bits/stdc++.h>

using namespace std;

bool dp[100005];

vector <int> a;

int N, K, temp;

int main(){

	scanf("%d%d", &N, &K);

	memset(dp, 0, sizeof(dp));

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

		scanf("%d", &temp);

		a.push_back(temp);

		dp[temp] = true;

	}

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

		bool win = false;

		for(auto j : a){

			if(i - j < 0) continue;

			if(dp[i-j] == false){

				win = true;

				break;

			}

		}

		if(win) dp[i] = true;

	}

	if(dp[K]) cout <<"First"<<endl;

	else cout << "Second"<<endl;





}

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

using namespace std;

#define  ll long long int

#define mx 100007

ll dp[mx];

ll a[mx];



int main()

{

    ll n,k;

    cin>>n>>k;

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



    memset(dp,0,sizeof(dp));

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

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

            if(i-a[j]>=0){

                if(dp[i-a[j]]==0){

                    dp[i]=1;

                    break;

                }

            }

        }

    }

    if(dp[k]==1) cout<<"First"<<endl;

    else cout<<"Second"<<endl;

}


// Optimized solution to the same problem (faster):
#include<bits/stdc++.h>

using namespace std;

bool dp[100005];

vector <int> a;

int N, K, temp;

int main(){

	scanf("%d%d", &N, &K);

	memset(dp, 0, sizeof(dp));

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

		scanf("%d", &temp);

		a.push_back(temp);

		dp[temp] = true;

	}

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

		bool win = false;

		for(auto j : a){

			if(i - j < 0) continue;

			if(dp[i-j] == false){

				win = true;

				break;

			}

		}

		if(win) dp[i] = true;

	}

	if(dp[K]) cout <<"First"<<endl;

	else cout << "Second"<<endl;





}

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

//#define int long long

#define fast ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)

using namespace std;

#define endl '\n'

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

#define vii vector<int>

int n, k;

int v[110];

int dp[100005][3];

int solve(int rem=k, bool player=0) {///0 for First ,1 for Second

	//if (rem < 0) return player;

	int& ret = dp[rem][player];

	if (~ret) return ret;

	ret = !player;

	for (i, 0, n) {

		if (v[i] <= rem) {

			if (solve(rem - v[i], !player) == player) {

				ret = player;

			}

		}

	}

	return ret;

}

signed main()

{

	   fast;

  

	cin >> n >> k;

	for (i, 0, n) cin >> v[i];

	memset(dp, -1, sizeof dp);

	int sol = solve();

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

	else cout << "Second\n";

}


// Optimized solution to the same problem (faster):
#include<bits/stdc++.h>

using namespace std;

bool dp[100005];

vector <int> a;

int N, K, temp;

int main(){

	scanf("%d%d", &N, &K);

	memset(dp, 0, sizeof(dp));

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

		scanf("%d", &temp);

		a.push_back(temp);

		dp[temp] = true;

	}

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

		bool win = false;

		for(auto j : a){

			if(i - j < 0) continue;

			if(dp[i-j] == false){

				win = true;

				break;

			}

		}

		if(win) dp[i] = true;

	}

	if(dp[K]) cout <<"First"<<endl;

	else cout << "Second"<<endl;





}

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

#include <ext/numeric>



using namespace std;

using namespace __gnu_cxx;



#define sz(v)           ((int)((v).size()))

#define clr(v, d)       memset(v, d, sizeof(v))

#define rep(i, v)       for(int i=0; i<sz(v); ++i)

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

#define lpi(i, j, n)    for(int i=(j); i<(int)(n); ++i)

#define lpd(i, j, n)    for(int i=(j); i>=(int)(n); --i)

//#define INF             1000000000

//#define INF             100000000000000



typedef long long ll;

typedef pair<int, int> ii;

typedef vector<ii> vii;

typedef vector<int> vi;



void init(){

	std::ios_base::sync_with_stdio(false);

	cin.tie(NULL);

	cout.tie(NULL);

}



const int N = 1e5+5;

const int M = 104;



int dp[N][2];



int arr[M];



int n, k;



bool solve(int cur_k, bool turn){

	if(cur_k < 0)

		return turn;

	int & cur = dp[cur_k][turn];

	if(cur != -1)

		return cur;

	lp(i, n)

		if(solve(cur_k - arr[i], !turn) == turn)

			return (cur = turn);

	return (cur = !turn);

}



int main()

{

	clr(dp, -1);

	cin >> n >> k;

	lp(i, n)

		cin >> arr[i];

	cout << (solve(k, 0)?"Second":"First");

	return 0;

}

// Optimized solution to the same problem (faster):
#include<bits/stdc++.h>

using namespace std;

const int N = 1e2+3;

const int K = 1e5+5;

bool dp[K];

int a[N];

int main() {

	int n, k;

	cin >> n >> k;

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

		cin >> a[i];

	for(int j = 0; j <= k; ++j)

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

			if(j - a[i] >= 0)

				dp[j] |= !dp[j-a[i]];

	cout << ((dp[k]) ? "First" : "Second");



	return 0;

}


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

#include <map>

#include <unordered_map>

#include <string>

#include <vector>

#include <queue>

#include <stack>

#include <algorithm>

using namespace std;



int main() {

    int n, k;

		cin >> n >> k;

		vector<int> dp(100005); int a[105];

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

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

		}

		dp[0] = 2;

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

			bool OK = false;

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

				if (i - a[j] >= 0) {

					if (dp[i - a[j]] == 2 || i - a[j] == 0) {

						dp[i] = 1;

						OK = true;

						break;

					}

				}

			}

			if (!OK) dp[i] = 2;

		}

        if (dp[k] == 1) printf("First\n"); 

		else printf("Second\n");

		return 0;

}

// Optimized solution to the same problem (faster):
#include <bits/stdc++.h>

using namespace std;

#define BIGINF (int) 4e18 + 7

#define MOD7 1000000007

#define MOD9 1e9 + 9

#define INF  (int)2e9 + 7

#define SCD(t) scanf("%d",&t)

#define SCLD(t) scanf("%ld",&t)

#define SCLLD(t) scanf("%lld",&t)

#define SCC(t) scanf("%c",&t)

#define SCS(t) scanf("%s",t)

#define SCF(t) scanf("%f",&t)

#define SCLF(t) scanf("%lf",&t)

#define MEM(a, b) memset(a, (b), sizeof(a))

typedef long long ll;

typedef long double ld;

typedef string str;

typedef double d;

typedef unsigned u;

typedef unsigned long long ull;



int main () {

    //freopen("inputf.txt", "r", stdin);

    //freopen("outputf.txt", "w", stdout);

    int n, k;

    cin >> n >> k;

    int a[105];

    bool dp[100005];

    memset(dp, false, sizeof(dp));

    dp[0] = false;

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

    	cin >> a[i];

    }



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

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

    		if (i - a[j] >= 0) {

    			if (dp[i - a[j]] == false) {

    				dp[i] = true;

    				break;

    			}

    		}

    	}

    }

    if (dp[k]) printf("First");

    else printf("Second");



    return 0;

}




// Fastest known solution for this problem: