#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return a * b / gcd(a, b); }
int main() {
  int n, k;
  cin >> n >> k;
  int l = 1, g = 1;
  for (int i = 0; i < n; i++) {
    int x;
    scanf("%d", &x);
    g = gcd(x, k);
    l = lcm(l, g);
  }
  if (k == l)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
