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