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