def isqrt(n): if n <= 0: return 0 x = int((n ** 0.5) * (1 + 1e-14)) while True: y = (x + n // x) // 2 if y >= x: return x x = y def smf_sieve(N): v = isqrt(N) assert v * v <= N < (v + 1) * (v + 1) smf = list(range(N + 1)) for d in range(2, N + 1, 2): smf[d] = 2 for p in range(3, v + 1, 2): if smf[p] != p: continue for d in range(p * p, N + 1, 2 * p): if smf[d] == d: smf[d] = p return smf N, M = map(int, input().split()) A = map(int, input().split()) mod = 998244353 C = [0] * (M + 1) smf = smf_sieve(N) for a in A: a0 = a divs = [1] while a > 1: p = smf[a] r = [1] while smf[a] == p: a //= p r.append(r[-1] * p) divs = [d * q for d in divs for q in r] for d in divs: C[d] += 1 C = [pow(2, c, mod) - 1 for c in C] M1 = M + 1 for i in range(M // 2, 0, -1): tmp = C[i] for n in range(i + i, M1, i): tmp -= C[n] C[i] = tmp % mod for c in C[1:]: print(c)