#include const int Mod = 998244353; int main() { int i, N, M, A, num[200001] = {}; scanf("%d %d", &N, &M); for (i = 1; i <= N; i++) { scanf("%d", &A); num[A]++; } int j, k, pow[200001]; long long ans[200001]; for (i = 1, pow[0] = 1; i <= N; i++) pow[i] = pow[i-1] * 2 % Mod; for (i = M; i >= 1; i--) { for (j = i, k = 0; j <= M; j += i) k += num[j]; for (j = i * 2, ans[i] = pow[k] - 1; j <= M; j += i) ans[i] += Mod - ans[j]; ans[i] %= Mod; } for (i = 1; i <= M; i++) printf("%lld\n", ans[i]); fflush(stdout); return 0; }