#include using namespace std; class Prime { public: template static bool is_prime(T n) { if (n == 0 || n == 1) return false; if (n == 2) return true; if (n % 2 == 0) return false; for (T i = 3; i * i < n + 1; i += 2) { if (n % i == 0) return false; } return true; } template static std::vector factor(T n) { std::vector res; for (T i = 2; i * i < n + 1; i++) { while (n % i == 0) { n /= i; res.emplace_back(i); } } if (n != 1) res.emplace_back(n); return res; } template static T totient(T n) { T res = 1; std::vector primes = factor(n); std::map mp; for (T p : primes) { mp[p]++; } for (const auto& [p, c] : mp) { res *= pow(p, c - 1) * (p - 1); } return res; } }; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int N, H; cin >> N >> H; vector A(N); for (auto&& e : A) { cin >> e; } vector primes = Prime::factor(H); for (auto&& p : primes) { bool ok = false; for (auto&& a : A) { if (a % p == 0) { a /= p; ok = true; break; } } if (!ok) { cout << "NO" << '\n'; return 0; } } cout << "YES" << '\n'; return 0; }