MOD = 998244353 N, M = map(int, input().split()) A = list(map(int, input().split())) cnt = [0] * (M + 1) for i in range(1, M + 1): j = i while j <= M: cnt[i] += A.count(j) cnt[i] %= MOD j += i cnt[i] = (pow(2, cnt[i], MOD) - 1) % MOD ans = [0] * (M + 1) for i in range(M, 0, -1): ans[i] = cnt[i] j = 2 * i while j <= M: ans[i] -= ans[j] ans[i] %= MOD j += i for i in range(1, M + 1): print(ans[i])