n,h=map(int,input().split()) a=list(map(int,input().split())) b=a[0] for x in a[1:]: b*=x if b%h==0: print('YES') else: print('NO')