#include using namespace std; using ll = long long; using ld = long double; using vi = vector; using vvi = vector>; using vvvi = vector>>; using vl = vector; using vvl = vector>; using vvvl = vector>>; using vs = vector; using vb = vector; #define FOR(i, m, n) for (int i = (m); i < (n); i++) #define FORR(i, m, n) for (int i = (m); i >= (n); i--) #define REP(i, n) FOR(i, 0, (n)) #define REPR(i, n) FORR(i, (n) - 1, 0) #define REP1(i, n) FOR(i, 1, (n) + 1) #define REPS(c, s) for (char c : s) #define ALL(c) (c).begin(), (c).end() #define SORT(c) sort(ALL(c)) #define REV(c) reverse(ALL(c)) #define sz(v) (int)v.size() #define endl '\n' template inline bool chmin(T& a, T b) {if (a > b) {a = b; return true;} return false;} template inline bool chmax(T& a, T b) {if (a < b) {a = b; return true;} return false;} template inline void prn(vector& v) {int n = sz(v); REP(i, n) cout << v[i] << ' ';} template inline void printv(vector& v) {int n = sz(v); REP(i, n) cout << v[i] << (i == n - 1 ? endl : ' ');} template inline void printvv(vector>& v) {for (auto u : v) printv(u);} template inline void printlnv(vector& v) {int n = sz(v); REP(i, n) cout << v[i] << endl;} const int MOD = 1000000007; const int INF = 1000000001; const ll LINF = 1000000001000000001LL; void solve(); int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout << fixed << setprecision(numeric_limits::max_digits10); solve(); return 0; } map prime_factorization(ll n) { map m; ll x = n; ll d = 2; while (x > 1 && d * d <= n) { if (x % d == 0) { m[d]++; x /= d; } else { d++; } } if (x != 1) m[x]++; return m; } void solve() { int n, h; cin >> n >> h; auto g = prime_factorization(h); // bool positive = true; REP(i, n) { int a; cin >> a; if (a == 0) { cout << "YES" << endl; return; } else if (a < 0) { // positive = !positive; a = abs(a); } for (auto e : g) { int c = 0; REP(j, e.second) { if (a % e.first == 0) { a /= e.first; c++; } } g[e.first] -= c; } } // if (!positive) { // cout << "NO" << endl; // return; // } for (auto q : g) { if (q.second > 0) { cout << "NO" << endl; return; } } cout << "YES" << endl; }