N,H=map(int,input().split()) *A,=map(int,input().split()) print('YNEOS'[all(a%H>0 for a in A)::2])