MOD = 998244353 n, m = map(int, input().split()) a = list(map(int, input().split())) cnt = [0 for _ in range(m + 1)] for x in a: cnt[x] += 1 mul = [0 for _ in range(m + 1)] for x in range(1, m + 1): for y in range(x, m + 1, x): mul[x] += cnt[y] dp = [0 for _ in range(m + 1)] for x in range(m, 0, -1): dp[x] = (pow(2, mul[x], MOD) - 1) % MOD for y in range(2 * x, m + 1, x): dp[x] = (dp[x] - dp[y]) % MOD print(*dp[1:], sep="\n")