N,M=map(int, input().split()) A=list(map(int, input().split())) D={} def make_divisors(n): lower_divisors , upper_divisors = [], [] i = 1 while i*i <= n: if n % i == 0: lower_divisors.append(i) if i != n // i: upper_divisors.append(n//i) i += 1 return lower_divisors + upper_divisors[::-1] E=[] for a in A: AA=make_divisors(a) for b in AA: if b not in D: D[b]=0 E.append(b) D[b]+=1 ans=[0]*(M+1) mod=998244353 E=sorted(E)[::-1] dd=0 for e in E: d=D[e] p=(pow(2,d,mod)-1)%mod dd+=p ans[e]+=p ans[e]%=mod now=e while now+e<=M: now+=e ans[e]-=ans[now] ans[e]%=mod ans=ans[1:] for i in range(M): print(ans[i])