#include <bits/stdc++.h>
using namespace std;
const int N = int(1e6 + 10);
bool is_composite[N];
vector<int> primes;
int cnt[N];
int mn[N];
int can[N];
int c[N];
vector<pair<int, int> > vi;
void sieve() {
  for (int i = 2; i < N; i++) {
    if (!is_composite[i]) {
      mn[i] = i;
      for (int j = i + i; j < N; j += i) {
        if (!is_composite[j]) {
          mn[j] = i;
          is_composite[j] = true;
        }
      }
    }
  }
  for (int i = 2; i < N; i++) {
    if (!is_composite[i]) {
      primes.push_back(i);
    }
  }
}
int main() {
  sieve();
  int n, k;
  scanf("%d %d", &n, &k);
  for (int u : primes) {
    if (u * u > k) {
      break;
    }
    while (k % u == 0) {
      cnt[u]++;
      k /= u;
    }
  }
  if (k != 1) {
    cnt[k]++;
  }
  for (int i = 2; i < N; i++) {
    can[i] = cnt[i] == 0;
  }
  for (int i = 1; i <= n; i++) {
    scanf("%d", &c[i]);
    int tmp = c[i];
    while (tmp != 1) {
      int bef = mn[tmp];
      int cc = 0;
      while (mn[tmp] == bef) {
        tmp /= mn[tmp];
        cc++;
      }
      can[bef] |= (cc >= cnt[bef]);
    }
  }
  bool ok = true;
  for (int i = 2; i < N; i++) {
    if (!can[i]) {
      ok = false;
      break;
    }
  }
  if (ok) {
    printf("Yes\n");
  } else {
    printf("No\n");
  }
  return 0;
}
