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