f=lambda:map(int,input().split()) n,h=f() *a,=f() s=1 for i in a: if i%h==0: print('YES') break s*=i%h else: print('YNEOS'[s%h>0::2])