n,h=list(map(int,input().split())) l=list(map(int,input().split())) a=1 for i in l: a*=i if(a%h==0): print("YES YES") else: print("NO")