n,h=map(int,input().split()) l=list(map(int,input().split())) x=1 for i in l: x*=i print("YES" if x%h==0 else "NO")