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