#include <bits/stdc++.h>
using namespace std;
namespace std {
template <typename T, typename U>
struct hash<pair<T, U>> {
  hash<T> t;
  hash<U> u;
  size_t operator()(const pair<T, U>& p) const {
    return t(p.first) ^ (u(p.second) << 7);
  }
};
}  // namespace std
template <typename T, typename F>
T bsh(T l, T h, const F& f) {
  T r = -1, m;
  while (l <= h) {
    m = (l + h) / 2;
    if (f(m)) {
      l = m + 1;
      r = m;
    } else {
      h = m - 1;
    }
  }
  return r;
}
template <typename T, typename F>
T bsl(T l, T h, const F& f) {
  T r = -1, m;
  while (l <= h) {
    m = (l + h) / 2;
    if (f(m)) {
      h = m - 1;
      r = m;
    } else {
      l = m + 1;
    }
  }
  return r;
}
template <typename T>
T gcd(T a, T b) {
  if (a < b) swap(a, b);
  return b ? gcd(b, a % b) : a;
}
template <typename T>
void fracn(pair<T, T>& a) {
  auto g = gcd(a.first, a.second);
  a.first /= g;
  a.second /= g;
}
template <typename T>
struct Index {
  int operator[](const T& t) {
    auto i = m.find(t);
    return i != m.end() ? i->second : m[t] = m.size();
  }
  int s() { return m.size(); }
  unordered_map<T, int> m;
};
int main(int, char**) {
  ios_base::sync_with_stdio(false);
  int N;
  cin >> N;
  ;
  int K;
  cin >> K;
  ;
  vector<int> C(N);
  for (auto& _cinv : C) cin >> _cinv;
  ;
  for (int& c : C) c = gcd(c, K);
  int M = 1;
  for (int c : C) {
    M *= c / gcd(M, c);
  }
  if (M == K) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}
