#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
#define N 200005
#define ll long long
#define mod 998244353
int n, k;
int A[N], S[305];
int C[305][305];
int main()
{
	scanf("%d%d", &n, &k);
	for (int i = 0; i <= k; i++)
	{
		C[i][0] = 1;
		for (int j = 1; j <= i; j++)
			C[i][j] = (C[i - 1][j] + C[i - 1][j - 1]) % mod;
	}
	for (int i = 1; i <= n; i++)
	{
		scanf("%d", &A[i]);
		int now = 1;
		for (int x = 0; x <= k; x++)
		{
			S[x] = (S[x] + now) % mod;
			now = (ll)now * A[i] % mod;
		}
	}
	int now = 1;
	for (int i = 1; i <= k; i++)
	{
		now = (now << 1) % mod;
		int ans = 0;
		for (int j = 0; j <= i; j++)
			ans = (ans + (ll)C[i][j] * S[j] % mod * S[i - j]) % mod;
		//printf("%d\n", ans);
		ans = (ans - (ll)now * S[i] % mod + mod) % mod;
		ans = ans * 499122177ll % mod;
		if (ans < 0)
			ans += mod;
		printf("%d\n", ans);
	}
}

#include <bits/stdc++.h>
#include <cassert>
typedef long long int ll;
using namespace std;
// #include <atcoder/all>
// using namespace atcoder;

// @@ !! LIM()

int main(/* int argc, char *argv[] */) {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout << setprecision(20);

  ll N, X; cin >> N >> X;
  vector<ll> A(N);
  for (ll i = 0; i < N; i++) cin >> A[i];
  
  map<ll, ll> mp;
  auto func = [&](auto rF, ll x, ll i) -> ll {
    while (i < N && x % A[i] == 0) i++;
    if (i == N) return 1;
    ll& ret = mp[x];
    if (ret == 0) {
      ll y = x % A[i];
      ret = rF(rF, x - y, i + 1) + rF(rF, x + (A[i] - y), i + 1);
    }
    return ret;
  };
  cout << func(func, X, 1) << endl;

  return 0;
}
