#include using namespace std; void fast_io() { ios_base::sync_with_stdio(false); cin.tie(nullptr); } #include using mint = atcoder::modint998244353; int main() { fast_io(); int n, m; cin >> n >> m; vector cnt(m + 1); for (int i = 0; i < n; i++) { int a; cin >> a; cnt[a]++; } for (int i = 1; i <= m; i++) { for (int j = i + i; j <= m; j += i) { cnt[i] += cnt[j]; } } vector ans(m + 1); for (int i = 1; i <= m; i++) { ans[i] = mint(2).pow(cnt[i]) - 1; } for (int i = m; i >= 1; i--) { for (int j = i + i; j <= m; j += i) { ans[i] -= ans[j]; } } for (int i = 1; i <= m; i++) { cout << ans[i].val() << "\n"; } }