#include <bits/stdc++.h>
using namespace std;
int n, k, c[1000006], lpf[1000006], ok = 1;
int expo[1000006];
void fact(int x) {
  int val, p;
  while (x != 1) {
    p = 0;
    val = lpf[x];
    while (x % val == 0) {
      x /= val;
      p++;
    }
    expo[val] = max(expo[val], p);
  }
}
void factk(int x) {
  int p, val;
  while (x != 1) {
    p = 0;
    val = lpf[x];
    while (x % val == 0) {
      x /= val;
      p++;
    }
    if (p > expo[val]) ok = 0;
  }
}
int main() {
  int i, j;
  std::ios::sync_with_stdio(false);
  cin >> n >> k;
  for (i = 1; i <= n; i++) cin >> c[i];
  lpf[1] = 1;
  for (i = 2; i <= 1000000; i++)
    if (!lpf[i]) {
      lpf[i] = i;
      for (j = i * 2; j <= 1000000; j += i)
        if (lpf[j] == 0) lpf[j] = i;
    }
  for (i = 1; i <= n; i++) fact(c[i]);
  factk(k);
  if (ok)
    cout << "Yes";
  else
    cout << "No";
  return 0;
}
