MOD = 998244353 N, X = map(int, input().split()) A = list(map(int, input().split())) nex = [-1]*(N+1) nex[N] = N for i in reversed(range(N)): nex[i] = nex[i+1] if A[i] != 1: nex[i] = i imos = [0]*(N+3) dp = [0]*(N+2) dp[0] = 1 for i in range(N+2): if 1 <= i: imos[i] += imos[i-1] imos[i] %= MOD dp[i] = imos[i] if i == N+1: break now = X if i == 0 else A[i-1] l, r = i, -1 SUM = 1 while l <= N and now%SUM == 0: r = nex[l] imos[l+1] += dp[i] imos[l+1] %= MOD imos[r+2] -= dp[i] imos[r+2] %= MOD if r < N: SUM *= A[r] l = r+1 print(dp[-1])