#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool amax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <typename T>
map<T, int> factorize(T n) {
  map<T, int> ret;
  for (T i = 2; i * i <= n; i++) {
    while (n % i == 0) {
      ++ret[i];
      n /= i;
    }
  }
  if (n != 1) ret[n] = 1;
  return ret;
}
void Main() {
  int N, K;
  scanf("%d%d", &N, &K);
  auto fk = factorize(K);
  vector<int> pk;
  for (auto &&pn : fk) {
    int x = 1;
    for (int i = int(0); i < int(pn.second); ++i) x *= pn.first;
    pk.push_back(x);
  }
  vector<int> C(N);
  for (int i = int(0); i < int(N); ++i) {
    scanf("%d", &C[i]);
  }
  sort((C).begin(), (C).end());
  C.erase(unique(C.begin(), C.end()), C.end());
  for (auto &&c : C) {
    for (auto &&j : pk)
      if (j != 1) {
        if (c % j == 0) j = 1;
      }
  }
  bool ok = 1;
  for (auto &&x : pk) {
    if (x != 1) ok = 0;
  }
  puts(ok ? "Yes" : "No");
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  Main();
  return 0;
}
