#include<iostream> #include<stdio.h> #include<stdlib.h> #include<algorithm> #include<vector> #include<string.h> #include<math.h> #include<map> #include<iomanip> #include<queue> using namespace std; using ll = long long; using ull = unsigned long long; ll mod = 1e9 + 7; int main(){ cin.tie(0); ios::sync_with_stdio(false); int n; ll h; cin >> n >> h; vector<ll> a(n); for(int i = 0; i < n; i++){ cin >> a[i]; } sort(a.begin() , a.end()); vector<ll> v; for(ll i = 2; i * i <= h; i++){ while(h % i == 0){ v.push_back(i); h /= i; } } if(h != 1)v.push_back(h); ll cnt = 0; for(int i = 0; i < v.size(); i++){ bool ok = false; for(int j = 0; j < n; j++){ if(a[j] % v[i] == 0){ a[j] /= v[i]; ok = true; break; } } if(!ok){ cout << "NO" << endl; return 0; } } cout << "YES" << endl; return 0; }