#include using namespace std; using ll = long long; using pll = pair; #define drep(i, cc, n) for (ll i = (cc); i <= (n); ++i) #define rep(i, n) drep(i, 0, n - 1) #define all(a) (a).begin(), (a).end() #define pb push_back #define fi first #define se second const ll MOD = 1000000007; const ll MOD2 = 998244353; const ll INF = 1LL << 60; const ll MAX_N = 2e5; ll pow_mod(ll x, ll n, ll mod){ ll ret = 1; while(n > 0){ if(n & 1) ret = (ret*x)%mod; x = x*x%mod; n >>=1; } return ret; } int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); ll n, m; cin >> n >> m; vector a(n); rep(i, n) cin >> a[i]; vector cnt(m+1, 0); rep(i, n){ for(ll j=1; j*j<=a[i]; j++){ if(a[i]%j!=0) continue; if(j==a[i]/j){ cnt[j]++; }else{ cnt[j]++; cnt[a[i]/j]++; } } } vector ans(m+1, 0); for(ll i=m; i>=1; i--){ ans[i] = pow_mod(2, cnt[i], MOD2)-1; for(ll j=2*i; j<=m; j+=i){ ans[i] = (ans[i] - ans[j] + MOD2)%MOD2; } } for(ll i=1; i<=m; i++) cout << ans[i] << endl; }