#include using namespace std; #ifdef LOCAL #include "settings/debug.cpp" #define _GLIBCXX_DEBUG #else #define Debug(...) void(0) #endif #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; int main() { int n, h; cin >> n >> h; vector a(n); rep(i, n) cin >> a[i]; map mp; for (int x : a) { for (int i = 2; i * i <= x; i++) { if (x % i == 0) { mp[i]++; while (x % i == 0) x /= i, mp[i]++; } } if (x != 1) mp[x]++; } for (int i = 2; i * i <= h; i++) { if (h % i == 0) { if (mp[i] == 0) { cout << "NO" << endl; return 0; } while (h % i == 0) h /= i, mp[i]--; } } if (h != 1 && mp[h] == 0) { cout << "NO" << endl; } else { cout << "YES" << endl; } return 0; }