#include #include #include #include #include #include #include #include #include #include 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 , h; cin >> n >> h; vector a(n); for(int i = 0; i < n; i++){ cin >> a[i]; } sort(a.begin() , a.end()); vector v; for(int i = 2; i * i <= h; i++){ if(h % i == 0){ while(h % i != 0){ h /= i; v.push_back(i); } } } if(h != 1)v.push_back(h); int cnt = 0; for(int i = 0; i < v.size(); i++){ for(int j = 0; j < n; j++){ if(a[j] % v[i] == 0){ cnt++; a[j] /= v[i]; break; } } } if(cnt == v.size()){ cout << "YES" << endl; }else{ cout << "N0" << endl; } return 0; }