#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; map mp; for (int i = 2; i * i <= h; i++) { while (h % i == 0) h /= i, mp[i]++; } if (h != 1) mp[h]++; vector a(n); rep(i, n) cin >> a[i]; for (int x : a) { for (auto&& [p, cnt] : mp) { while (x % p == 0) x /= p, cnt--; } } for (auto&& [p, cnt] : mp) { if (cnt > 0) { cout << "NO" << endl; return 0; } } cout << "YES" << endl; return 0; }