#include using namespace std; template bool chmax(T &u, const T z) { if (u < z) {u = z; return true;} else return false; } template bool chmin(T &u, const T z) { if (u > z) {u = z; return true;} else return false; } #define ll long long #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) typedef pair P; //const ll INF = 1LL << 60; //using mint = modint1000000007; //using mint = modint998244353; const int MOD = 1000000007; ll gcd(ll x, ll y) { return y ? gcd(y, x % y) : x; } int main(){ ll n,h; cin>>n>>h; vectora(n); rep(i,n)cin>>a[i]; rep(i,n){ ll tmp=gcd(a[i],h); h/=tmp; } if(h==1)cout<<"YES"<