#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int n, k, c[1000005];
bool chek(int awa) {
  for (int i = 1; i <= n; i++)
    if (c[i] % awa == 0) return true;
  return false;
}
bool check() {
  for (int i = 2; i * i <= k; i++) {
    if (k % i == 0) {
      int now = 1;
      while (k % i == 0) {
        now *= i;
        k /= i;
      }
      if (!chek(now)) return false;
    }
  }
  if (k != 1)
    if (!chek(k)) return false;
  return true;
}
int main() {
  n = read(), k = read();
  for (int i = 1; i <= n; i++) c[i] = read();
  if (check())
    printf("Yes");
  else
    printf("No");
  return 0;
}
