P=998244353 def J(): return map(int,input().split()) N,M=J() L=M+1 K=range(1,L) C=[0]*L for i in J():C[i]+=1 G=[pow(2,sum(C[::k]),P)-1 for k in K] F=[0]*L for k in K:F[M-k+1]=G[M-k]-sum(F[::M-k+1]) for k in K:print(F[k]%P)