n, h = map(int, input().split()) a = list(map(int, input().split())) ans = 1 for i in range(n): ans *= a[i] print("YES" if ans % h == 0 else "NO")