#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
int gcd(int p, int q) {
  if (q == 0) return p;
  return gcd(q, p % q);
}
unsigned long long int lcm(int p, int q) {
  return (unsigned long long int)p * q / gcd(p, q);
}
int main() {
  std::ios::sync_with_stdio(false);
  int n, k;
  cin >> n >> k;
  int input;
  unsigned long long int x = 1;
  for (int i = 0; i < n; i += 1) {
    cin >> input;
    x = lcm(input, x) % k;
  }
  if (x % k == 0)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
