N,H = map(int,input().split()) A = list(map(int,input().split())) flg = 0 num = 1 for a in A: num *= a if num%H == 0: flg = 1 break num %= H if flg: print("YES") else: print("NO")