#include <bits/stdc++.h>
using namespace std;
class numberTheory {
 public:
  numberTheory() {}
  pair<long long int, long long int> extendedEuclid(long long int a,
                                                    long long int b) {
    if (b == 0)
      return pair<long long int, long long int>(1LL, 0LL);
    else {
      pair<int, int> d = extendedEuclid(b, a % b);
      return pair<long long int, long long int>(d.second,
                                                d.first - d.second * (a / b));
    }
  }
  long long int modularInverse(long long int a, long long int n) {
    pair<long long int, long long int> ret = extendedEuclid(a, n);
    return ((ret.first % n) + n) % n;
  }
  long long int bigMod(long long int a, long long int n, long long int m) {
    long long int res = 1, x = a;
    while (n) {
      if (n & 1) {
        res = (res * x) % m;
      }
      x = (x * x) % m;
      n = n >> 1;
    }
    return res;
  }
};
inline long long int gcd(long long int a, long long int b) {
  return b == 0 ? a : gcd(b, a % b);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  {
    long long int n, k, i, a, sz, gc, lc, temp, lcnew;
    cin >> n >> k;
    cin >> lc;
    lc = gcd(k, lc);
    for (i = 1; i < n; i++) {
      cin >> a;
      gc = gcd(a, lc);
      lcnew = a / gc;
      lc *= gcd(lcnew, k / gc);
    }
    if (lc == k)
      cout << "Yes\n";
    else
      cout << "No\n";
  }
  return 0;
}
