#include <bits/stdc++.h>
using namespace std;
const int N = 1000005;
int p[N], cnt, use[N], fd[N], k, n;
bool isp[N];
void Get() {
  for (int i = 2; i <= 1000000; i++) {
    if (!isp[i]) p[++cnt] = i, fd[i] = cnt;
    for (int j = 1; j <= cnt && 1ll * i * p[j] <= 1000000; j++) {
      isp[i * p[j]] = 1;
      if (i % p[j] == 0) break;
    }
  }
}
void div(int x) {
  int i = 1, tmp = 0;
  while (x != 1 && p[i] * p[i] <= x) {
    while (x % p[i] == 0) tmp++, x /= p[i];
    if (tmp > use[i]) use[i] = tmp;
    tmp = 0;
    i++;
  }
  if (x != 1) use[fd[x]] = max(use[fd[x]], 1);
}
void Judge() {
  int ct = 0, x = k, i = 1, tmp = 0;
  while (x != 1 && p[i] * p[i] <= x) {
    while (x % p[i] == 0) tmp++, x /= p[i];
    if (tmp > use[i]) {
      puts("No"), exit(0);
    }
    tmp = 0;
    i++;
  }
  if (x != 1 && !use[fd[x]]) {
    puts("No"), exit(0);
  }
  puts("Yes");
}
int main() {
  int c;
  Get();
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &c);
    div(c);
  }
  Judge();
  return 0;
}
