n,h = map(int,input().split()) *a, = map(int,input().split()) from math import gcd for ai in a: g = gcd(h,ai) h //= g print("YES" if h==1 else "NO")