#include using namespace std; using ll = long long; const int INF = 1e9 + 10; const ll INFL = 4e18; template struct ModInt { ll value; ModInt(ll x = 0) { value = (x >= 0 ? x % MOD : MOD - (-x) % MOD); } ModInt operator-() const { return ModInt(-value); } ModInt operator+() const { return ModInt(*this); } ModInt& operator+=(const ModInt& other) { value += other.value; if (value >= MOD) value -= MOD; return *this; } ModInt& operator-=(const ModInt& other) { value += MOD - other.value; if (value >= MOD) value -= MOD; return *this; } ModInt& operator*=(const ModInt other) { value = value * other.value % MOD; return *this; } ModInt& operator/=(ModInt other) { (*this) *= other.inv(); return *this; } ModInt operator+(const ModInt& other) const { return ModInt(*this) += other; } ModInt operator-(const ModInt& other) const { return ModInt(*this) -= other; } ModInt operator*(const ModInt& other) const { return ModInt(*this) *= other; } ModInt operator/(const ModInt& other) const { return ModInt(*this) /= other; } ModInt pow(ll x) const { ModInt ret(1), mul(value); while (x) { if (x & 1) ret *= mul; mul *= mul; x >>= 1; } return ret; } ModInt inv() const { return pow(MOD - 2); } bool operator==(const ModInt& other) const { return value == other.value; } bool operator!=(const ModInt& other) const { return value != other.value; } friend ostream& operator<<(ostream& os, const ModInt& x) { return os << x.value; } friend istream& operator>>(istream& is, ModInt& x) { ll v; is >> v; x = ModInt(v); return is; } static constexpr ll get_mod() { return MOD; } }; using Mod998 = ModInt<998244353>; using Mod107 = ModInt<1000000007>; using mint = Mod998; int main() { int N, M; cin >> N >> M; vector A(N); for (int i = 0; i < N; i++) cin >> A[i]; vector> div(M + 1); for (int i = 1; i <= M; i++) { for (int j = i; j <= M; j += i) { div[j].push_back(i); } } vector ex(M + 1); for (int i = 0; i < N; i++) { for (int x : div[A[i]]) ex[x]++; } vector dp(M + 1); for (int i = M; i >= 1; i--) { dp[i] = mint(2).pow(ex[i]) - 1; for (int j = i * 2; j <= M; j += i) { dp[i] -= dp[j]; } } for (int i = 1; i <= M; i++) cout << dp[i] << '\n'; }