#include <bits/stdc++.h>
const long long MAXN = int(1e6);
using namespace std;
long long st[MAXN], k[MAXN], f[MAXN];
int main() {
  long long n, m, kol = 0, i, j;
  scanf("%I64d%I64d\n", &n, &m);
  for (i = 2; i <= sqrt(m); i++)
    while (m % i == 0) {
      m /= i;
      if (st[kol] == i)
        k[kol] *= i;
      else
        st[++kol] = i, k[kol] = i;
    }
  if (m > 1) k[++kol] = m;
  for (i = 1; i <= n; i++) {
    long long a;
    scanf("%I64d", &a);
    for (j = 1; j <= kol; j++)
      if (a % k[j] == 0) f[j] = 1;
  }
  for (i = 1; i <= kol; i++)
    if (f[i] != 1) {
      cout << "No" << endl;
      return 0;
    }
  cout << "Yes" << endl;
  return 0;
}
