N,M=map(int,input().split()) A=[int(x) for x in input().split()] B=[0]*M mod=998244353 for i in range(N): B[A[i]-1]+=1 C=[0]*M for i in range(M): x=i+1 t=1 while x*t<=M: C[i]+=B[x*t-1] t+=1 ans=[0]*M for i in reversed(range(M)): a=pow(2,C[i],mod)-1 x=i+1 t=2 while t*x<=M: a-=ans[t*x-1] a%=mod t+=1 ans[i]=a [print(a) for a in ans]