#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, k, tmp;
  set<int> c;
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> tmp;
    c.insert(tmp);
  }
  vector<int> f;
  for (int i = 2; i * i <= k; i++) {
    if (k % i == 0) {
      int t = 1;
      while (k % i == 0) {
        t *= i;
        k /= i;
      }
      f.push_back(t);
    }
  }
  if (k > 1) f.push_back(k);
  bool check;
  string res = "YES";
  for (int i = 0; i < f.size(); i++) {
    check = false;
    for (auto ci : c) {
      if (ci % f[i] == 0) {
        check = true;
        break;
      }
    }
    if (!check) {
      res = "NO";
      break;
    }
  }
  cout << res;
}
