#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <class T>
using vec = vector<T>;
template <class T>
using vvec = vector<vec<T>>;
template <class T>
bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
struct Prime {
  vector<int> v;
  vvec<int> prime_list;
  Prime(int N) : v(N), prime_list(N + 1) {
    for (int i = 0; i <= N; i++) {
      v[i] = 1;
    }
    for (int i = 2; i <= N; i++) {
      if (v[i]) {
        prime_list[i].push_back(i);
        for (int j = 0; i * (j + 2) <= N; j++) {
          v[i * (j + 2)] = 0;
          prime_list[i * (j + 2)].push_back(i);
        }
      }
    }
  }
};
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int N, K;
  cin >> N >> K;
  set<int> s;
  for (int i = 0; i < (N); i++) {
    int a;
    cin >> a;
    s.insert(a);
  }
  Prime P(1e6);
  map<int, int> primes;
  for (auto& x : s) {
    int n = x;
    map<int, int> mp;
    for (auto& i : P.prime_list[x]) {
      while (n % i == 0) {
        n /= i;
        mp[i]++;
      }
    }
    if (n != 1) mp[n]++;
    for (auto& [p, c] : mp) chmax(primes[p], c);
  }
  for (auto& [p, c] : primes) {
    while (K % p == 0 && c) {
      K /= p;
      c--;
    }
  }
  cout << (K == 1 ? "Yes\n" : "No\n");
}
