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