mod = 998244353 U = 2 * 10 ** 5 two = [1] * (U + 1) for i in range(1, U+1): two[i] = two[i-1] * 2 % mod def zeta_div(A, primes): n = len(A) - 1 for p in primes: for i in reversed(range(1, n // p + 1)): A[i] += A[i * p] def moebius_div(A, primes): n = len(A) for p in primes: for i in range(1, n): if i * p >= n: break A[i] -= A[i * p] def main(): N, M = map(int, input().split()) A = list(map(int, input().split())) F = [0] * (M + 1) for a in A: F[a] += 1 for i in range(M + 1): F[i] = two[F[i]] - 1 for i in range(1, M + 1): p = 1 for j in range(i, M+1, i): p = p * (F[j] + 1) % mod F[i] = p - 1 for i in range(1, M + 1)[::-1]: for j in range(i+i, M+1, i): F[i] -= F[j] F[i] %= mod print(*F[1:], sep="\n") main()