#include <bits/stdc++.h>
const int inf = (int)1e9;
const int mod = 1e9 + 7;
using namespace std;
int n, k;
int c[1000011];
int p[1000011], cntp[1000011], col[1000011];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> k;
  int maxc = k;
  for (int i = 1; i <= n; i++) {
    cin >> c[i];
    maxc = max(maxc, c[i]);
  }
  for (int i = 2; i <= maxc; i++) {
    if (!p[i]) {
      for (int j = i; j <= maxc; j += i) {
        p[j] = i;
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    while (c[i] > 1) {
      int cnt = 0;
      int x = p[c[i]];
      while (p[c[i]] == x) {
        cnt++;
        c[i] /= p[c[i]];
      }
      cntp[x] = max(cntp[x], cnt);
    }
  }
  bool ans = 1;
  while (k > 1) {
    col[p[k]]++;
    if (col[p[k]] > cntp[p[k]]) {
      ans = 0;
    }
    k /= p[k];
  }
  if (ans) {
    cout << "Yes";
  } else
    cout << "No";
  return 0;
}
