#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
;
long long max(long long a, long long b) {
  if (a > b)
    return a;
  else
    return b;
}
long long min(long long a, long long b) {
  if (a > b)
    return b;
  else
    return a;
}
long long gcd(long long a, long long b) { return (b == 0) ? a : gcd(b, a % b); }
inline long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
inline long long normalize(long long x, long long mod) {
  x %= mod;
  if (x < 0) x += mod;
  return x;
}
long long dx[4] = {0, 0, 1, -1};
long long dy[4] = {1, -1, 0, 0};
string abc = "abcdefghijklmnopqrstuvwxyz";
const double PI = acosl(-1);
const long long mod = 998244353;
const long long inf = 1e18 + 5;
inline long long add(long long a, long long b, long long p = mod) {
  long long c = a + b;
  if (c >= p) c -= p;
  return c;
}
inline long long sub(long long a, long long b, long long p = mod) {
  long long c = a - b;
  if (c < 0) c += p;
  return c;
}
inline long long mul(long long a, long long b, long long p = mod) {
  return (a * 1ll * b) % p;
}
long long floor1(long long n, long long k) {
  if (n % k == 0 || n >= 0) return n / k;
  return (n / k) - 1;
}
long long ceil1(long long n, long long k) { return floor1(n + k - 1, k); }
long long powm(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b & 1) res = (res * a) % mod;
    a = (a * a) % mod;
    b >>= 1;
  }
  return res;
}
const long long N = 1e6 + 5;
long long n, k;
long long a[N];
void solve() {
  cin >> n >> k;
  set<long long> s;
  long long storek = k;
  for (long long i = 2; i <= k; i++) {
    while (k % i == 0) {
      k /= i;
      s.insert(i);
    }
  }
  map<long long, long long> m1;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
    for (auto it : s) {
      long long cntr = 0;
      while (a[i] % it == 0) {
        cntr++;
        a[i] /= it;
      }
      m1[it] = max(m1[it], cntr);
    }
  }
  k = storek;
  map<long long, long long> m2;
  for (long long i = 2; i * i <= storek; ++i) {
    if (storek % i == 0) {
      while (storek % i == 0) {
        storek /= i;
        ++m2[i];
      }
    }
  }
  if (storek > 1) ++m2[storek];
  long long flag = 1;
  for (auto i : m2) {
    if (i.second > m1[i.first] or m1[i.first] == 0) {
      flag = 0;
      break;
    }
  }
  if (flag)
    cout << "Yes";
  else
    cout << "No";
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout << fixed << setprecision(10);
  long long t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
