#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e6 + 5;
long long gcd(long long a, long long b) { return a == 0 ? b : gcd(b % a, a); }
long long lcm(long long a, long long b) { return a * b / gcd(a, b); }
int a[MAXN];
int main() {
  ios::sync_with_stdio(false);
  int n, k;
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  long long ans = 1;
  for (int i = 1; i <= n; i++) {
    ans = lcm(ans, a[i]);
    ans = gcd(ans, k);
    if (ans == k) {
      cout << "YES" << endl;
      return 0;
    }
  }
  cout << "NO" << endl;
}
