#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int MAXN = 2e5 + 7;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long i, j, n, m, t, k, x, y, x2, z, maxx, tot = 0, minn, sum[100005] = {0},
                                               b[100005] = {0};
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k;
  x = 1;
  for (i = 1; i <= n; i++) {
    cin >> m;
    x = lcm(x, m);
    x %= k;
  }
  if (x % k)
    cout << "NO" << endl;
  else
    cout << "YES" << endl;
  return 0;
}
