def div(n): if n <= 0: return [] S = set() i = 1 while i * i <= n: if n % i == 0: S.add(i) S.add(n // i) i += 1 return list(S) N, M = map(int, input().split()) A = list(map(int, input().split())) mod = 998244353 L = [0] * (M + 1) D = [0] * (M + 1) for a in A: D[a] += 1 for i in range(1, M + 1): if D[i] == 0: continue for d in div(i): L[d] += D[i] two = [1] * 202020 for i in range(202000): two[i + 1] = two[i] * 2 two[i + 1] %= mod ans = [0] * (M + 1) for i in range(M + 1): ans[i] = two[L[i]] - 1 for i in range(M, 0, -1): if ans[i] == 0: continue for d in div(i): if d == i: continue ans[d] -= ans[i] ans[d] %= mod for i in range(1, M + 1): print(ans[i])