#include using namespace std; using ll = long long; ll const m = 998244353; ll mpow(ll a, ll n) { ll ret = 1; while (n) { if (n & 1) { ret = (ret * a) % m; } a = (a * a) % m; n >>= 1; } return ret; } int main () { int N, K; cin >> N >> K; std::vector A(N); for (auto& a : A) { cin >> a; } vector B(K + 1, 0); for (auto a : A) { B[a] ++; } for (int i = 1; i <= K; i ++) { for (int j = 2; j * i <= K; j ++) { B[i] += B[i * j]; } } vector dp(K + 1, 0), ans(K + 1, 0), meb(K + 1, -2); for (int i = 0; i <= K; i ++) { dp[i] = mpow(2, B[i]) - 1; } meb[1] = 1; for (int i = 2; i <= K; i ++) { if (meb[i] == -2) { meb[i] = -1; for (int j = 2; i * j <= K; j ++) { if (meb[i * j] == -2) { meb[i * j] = -1; } else { meb[i * j] *= -1; } } if (i < 1000) { for (int j = 1; i * i * j <= K; j ++) { meb[i * i * j] = 0; } } } } for (int i = K; i > 0; i --) { ans[i] = dp[i]; for (int j = 2; j * i <= K; j ++) { ans[i] += (dp[i * j] * meb[j]); ans[i] += m; ans[i] %= m; } } for (int i = 1; i <= K; i ++) { cout << ans[i] << " "; } cout << endl; }