import sys input = sys.stdin.readline N, M = map(int, input().split()) A = list(map(int, input().split())) cnt = [0]*(M+1) for Ai in A: for d in range(1, int(Ai**0.5)+1): if Ai%d==0: cnt[d] += 1 if d!=Ai//d: cnt[Ai//d] += 1 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])