n,H=map(int,input().split()) a=list(map(int,input().split())) g=1 for v in a: g*=v g%=H print(["NO","YES"][g==0])