N, H, *A = map(int, open(0).read().split()) prod = 1 for a in A: prod *= a prod %= H print("YES" if prod == 0 else "NO")