import sys input = sys.stdin.readline from collections import * N, M = map(int, input().split()) A = list(map(int, input().split())) mp = Counter(A) cnt = [0]*(M+1) for d in range(1, M+1): for x in range(d, M+1, d): cnt[d] += mp[x] ans = [0]*(M+1) MOD = 998244353 pow2 = [1]*(N+10) for i in range(1, N+10): pow2[i] = pow2[i-1]*2%MOD for d in range(M, 0, -1): ans[d] = (pow2[cnt[d]]-1)%MOD for x in range(2*d, M+1, d): ans[d] -= ans[x] ans[d] %= MOD for d in range(1, M+1): print(ans[d])