#include <bits/stdc++.h>
using namespace std;
const int N = 1000020;
int lp[N + 1];
int h[N + 1];
vector<int> pr;
vector<pair<long long, long long> > get(int k) {
  vector<pair<long long, long long> > divs;
  while (k != 1) {
    int t = 0;
    int cur = lp[k];
    while (k % cur == 0) {
      k /= cur;
      t++;
    }
    divs.push_back(make_pair(cur, t));
  }
  return divs;
}
int R[1000100];
int main() {
  ios_base::sync_with_stdio(0);
  for (int i = 2; i <= N; ++i) {
    if (lp[i] == 0) {
      lp[i] = i;
      pr.push_back(i);
    }
    for (int j = 0; j < (int)pr.size() && pr[j] <= lp[i] && i * pr[j] <= N;
         ++j) {
      lp[i * pr[j]] = pr[j];
      h[i * pr[j]] = i;
    }
  }
  int n, k;
  cin >> n >> k;
  vector<pair<long long, long long> > divs = get(k);
  for (int i = 0; i < divs.size(); ++i) R[divs[i].first] = divs[i].second;
  for (int i = 0; i < n; ++i) {
    int x;
    scanf("%d", &x);
    divs = get(x);
    for (int j = 0; j < divs.size(); ++j)
      if (R[divs[j].first] <= divs[j].second) R[divs[j].first] = 0;
  }
  bool ok = true;
  for (int i = 0; i <= 1000000 && ok; ++i) ok = (ok && (R[i] == 0));
  if (ok)
    cout << "Yes";
  else
    cout << "No";
  return 0;
}
