#include <bits/stdc++.h>
using namespace std;
template <class T1, class T2>
bool chmin(T1 &a, T2 b) {
  return b < a && (a = b, true);
}
template <class T1, class T2>
bool chmax(T1 &a, T2 b) {
  return a < b && (a = b, true);
}
using ll = long long;
using ld = long double;
using vll = vector<ll>;
using vvll = vector<vll>;
using vld = vector<ld>;
using vi = vector<int>;
using vvi = vector<vi>;
vll conv(vi &v) {
  vll r(v.size());
  for (long long i = 0; i < (long long)(v.size()); i++) r[i] = v[i];
  return r;
}
using P = pair<ll, ll>;
template <typename T, typename U>
ostream &operator<<(ostream &o, const pair<T, U> &v) {
  o << "(" << v.first << ", " << v.second << ")";
  return o;
}
template <size_t...>
struct seq {};
template <size_t N, size_t... Is>
struct gen_seq : gen_seq<N - 1, N - 1, Is...> {};
template <size_t... Is>
struct gen_seq<0, Is...> : seq<Is...> {};
template <class Ch, class Tr, class Tuple, size_t... Is>
void print_tuple(basic_ostream<Ch, Tr> &os, Tuple const &t, seq<Is...>) {
  using s = int[];
  (void)s{0, (void(os << (Is == 0 ? "" : ", ") << get<Is>(t)), 0)...};
}
template <class Ch, class Tr, class... Args>
auto operator<<(basic_ostream<Ch, Tr> &os, tuple<Args...> const &t)
    -> basic_ostream<Ch, Tr> & {
  os << "(";
  print_tuple(os, t, gen_seq<sizeof...(Args)>());
  return os << ")";
}
ostream &operator<<(ostream &o, const vvll &v) {
  for (long long i = 0; i < (long long)(v.size()); i++) {
    for (long long j = 0; j < (long long)(v[i].size()); j++)
      o << v[i][j] << " ";
    cout << endl;
  }
  return o;
}
template <typename T>
ostream &operator<<(ostream &o, const vector<T> &v) {
  o << '[';
  for (long long i = 0; i < (long long)(v.size()); i++)
    o << v[i] << (i != v.size() - 1 ? ", " : "");
  o << "]";
  return o;
}
template <typename T>
ostream &operator<<(ostream &o, const set<T> &m) {
  o << '[';
  for (auto it = m.begin(); it != m.end(); it++)
    o << *it << (next(it) != m.end() ? ", " : "");
  o << "]";
  return o;
}
template <typename T, typename U>
ostream &operator<<(ostream &o, const map<T, U> &m) {
  o << '[';
  for (auto it = m.begin(); it != m.end(); it++)
    o << *it << (next(it) != m.end() ? ", " : "");
  o << "]";
  return o;
}
template <typename T, typename U>
ostream &operator<<(ostream &o, const unordered_map<T, U> &m) {
  o << '[';
  for (auto it = m.begin(); it != m.end(); it++) o << *it;
  o << "]";
  return o;
}
void printbits(ll mask, ll n) {
  for (long long i = 0; i < (long long)(n); i++) {
    cout << !!(mask & (1ll << i));
  }
  cout << endl;
}
static const double EPS = 1e-14;
static const long long INF = 1e18;
static const long long mo = 1e9 + 7;
void sieve_of_eratosthenes(vector<ll> &primes, ll n) {
  primes.resize(n);
  for (ll i = 2; i < n; ++i) primes[i] = i;
  for (ll i = 2; i * i < n; ++i)
    if (primes[i])
      for (ll j = i * i; j < n; j += i) primes[j] = 0;
}
void getPrimesList(ll n, vector<ll> &primes_list) {
  vector<ll> tmpList;
  primes_list.clear();
  primes_list.resize(0);
  primes_list.reserve(n / 5);
  sieve_of_eratosthenes(tmpList, n);
  for (long long i = 0; i < (long long)(n); i++) {
    if (tmpList[i]) primes_list.push_back(i);
  }
}
vector<ll> primesList;
set<ll> primesSet;
ll primesListMax;
void constructPrimesList(ll n) {
  if (primesListMax >= n) return;
  primesListMax = n;
  getPrimesList(n, primesList);
  for (ll i = 0; i < primesList.size(); i++) {
    primesSet.insert(primesList[i]);
  }
}
bool isPrimeLookup(ll n) { return primesSet.count(n); }
void getPrimeFactorizationList(ll n, map<ll, ll> &divisors_list) {
  divisors_list.clear();
  if (n <= 1) return;
  ll prime = 2;
  while (n >= prime * prime) {
    if (n % prime == 0) {
      divisors_list[prime]++;
      n /= prime;
    } else {
      prime++;
    }
  }
  divisors_list[n]++;
}
vll a;
int main(void) {
  ll n, k;
  scanf("%lld", &n);
  scanf("%lld", &k);
  a = vll(n);
  for (long long i = 0; i < (long long)(a.size()); i++) scanf("%lld", &a[i]);
  constructPrimesList(1e6);
  map<ll, ll> f;
  getPrimeFactorizationList(k, f);
  for (auto x : f) {
    ll tex = 0;
    for (long long i = 0; i < (long long)(n); i++) {
      if (a[i] % (ll)round(pow(x.first, x.second)) == 0) {
        tex = 1;
      }
    }
    if (!tex) {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
  return 0;
}
