#include <bits/stdc++.h>
using namespace std;
int c[1000001];
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  int n, k;
  cin >> n >> k;
  vector<int> vt;
  int j = 2;
  while (j * j <= k) {
    if (k % j == 0) {
      vt.push_back(1);
      while (k % j == 0) {
        vt.back() *= j;
        k /= j;
      }
    }
    j++;
  }
  if (k > 1) {
    vt.push_back(k);
  }
  vector<bool> b(vt.size());
  for (int i = 0; i < n; i++) {
    cin >> c[i];
    for (int j = 0; j < vt.size(); j++) {
      if (c[i] % vt[j] == 0) {
        b[j] = true;
      }
    }
  }
  bool b1 = true;
  for (int i = 0; i < vt.size(); i++) {
    b1 &= b[i];
  }
  if (b1)
    cout << "Yes";
  else
    cout << "No";
  return 0;
}
