#include <bits/stdc++.h>
using namespace std;
inline int add(int a, int b, int m = 1000000007) {
  a += b;
  if (a >= m) a -= m;
  return a;
}
inline int mul(int a, int b, int m = 1000000007) {
  return (int)(((long long)a * (long long)b) % m);
}
inline long long getMin(long long a, long long b) { return a > b ? b : a; }
inline long long getMax(long long a, long long b) { return a > b ? a : b; }
inline long long getMid(long long a, long long b) { return a + (b - a) / 2; }
long long getGcd(long long a, long long b) {
  if (a > b) {
    long long temp = a;
    a = b;
    b = temp;
  }
  if (a == 0) return b;
  if (a == 1) return 1;
  return getGcd(a, b % a);
}
int main() {
  long long n, k;
  scanf("%I64d%I64d", &n, &k);
  long long lcm = 1;
  long long temp;
  scanf("%I64d", &temp);
  lcm = temp;
  for (long long i = 0; i <= n - 2; ++i) {
    scanf("%I64d", &temp);
    long long gcd = getGcd(lcm, temp);
    lcm *= temp;
    lcm /= gcd;
    long long gcd2 = getGcd(lcm, k);
    lcm = gcd2;
  }
  if (lcm % k == 0) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
