# https://yukicoder.me/problems/no/1250 import sys n, h = list(map(int, input().split())) a = list(map(int, input().split())) ans = "NO" q = a[0] for i in range(1, n): q *= a[i] q %= h if ((q % h) == 0): print("YES") else: print("NO")