N, H = map(int, input().split()) l_A = list(map(int, input().split())) ans = 1 for li in l_A: ans = (ans*li)%H if ans == 0: print("YES") else: print("NO")