import sys N,H = list(map(int,input().split())) A = list(map(int,input().split())) S = 1 for i in A: S *= i S %= H if S == 0: print('YES') exit() print('NO')