N, H = map(int, input().split()) A = list(map(int, input().split())) prod = 1 for i in range(N): prod *= A[i] if prod % H == 0: print("YES") else: print("NO")