#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
const double pi = acos(-1);
const long long inf = 0x3f3f3f3f3f3f3f3f;
const int INF = 0x3f3f3f3f;
const int MAX = 2e5 + 10;
const long long mod = 1e9 + 7;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long kgcd(long long a, long long b) {
  if (a == 0) return b;
  if (b == 0) return a;
  if (!(a & 1) && !(b & 1))
    return kgcd(a >> 1, b >> 1) << 1;
  else if (!(b & 1))
    return kgcd(a, b >> 1);
  else if (!(a & 1))
    return kgcd(a >> 1, b);
  else
    return kgcd(abs(a - b), min(a, b));
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, k;
  cin >> n >> k;
  long long lcm = 1;
  for (int i = (1); i <= (n); ++i) {
    int x;
    cin >> x;
    lcm *= x / kgcd(x, lcm);
    lcm %= k;
  }
  if (lcm % k == 0)
    cout << "Yes";
  else
    cout << "No";
}
