#include <bits/stdc++.h>
using namespace std;
bool prime[1000002];
int factor_count[1000002];
int dup_factor_count[1000002];
void sieve(int n) {
  int p, i;
  for (i = 0; i < n + 2; i++) {
    prime[i] = true;
    factor_count[i] = 0;
    dup_factor_count[i] = 0;
  }
  for (p = 2; p * p <= n + 2; p++) {
    if (prime[p] == true) {
      for (i = p * 2; i <= n + 2; i += p) prime[i] = false;
    }
  }
}
void factorise(int a) {
  int i;
  for (i = 2; i < a + 1; i++) {
    if (prime[i]) {
      int temp = a;
      while ((temp != 0) && (temp % i == 0)) {
        factor_count[i]++;
        temp = temp / i;
      }
    }
  }
}
int main(void) {
  ios_base::sync_with_stdio(0);
  int test, i, p, j, d, k, left, right, a, b, n, count;
  vector<int> prime_factors;
  cin >> n >> k;
  int arr[n];
  sieve(1000000);
  for (i = 0; i < n; i++) {
    cin >> arr[i];
  }
  factorise(k);
  for (i = 0; i < 1000002; i++) {
    if (factor_count[i]) prime_factors.push_back(i);
  }
  for (i = 0; i < n; i++) {
    for (j = 0; j < prime_factors.size(); j++) {
      if (arr[i] % prime_factors[j] == 0) {
        int count = 0;
        int temp = arr[i];
        while (temp % prime_factors[j] == 0) {
          temp /= prime_factors[j];
          count++;
        }
        if (dup_factor_count[prime_factors[j]] < count) {
          dup_factor_count[prime_factors[j]] = count;
        }
      }
    }
  }
  int check = 1;
  for (i = 0; i < 1000002; i++) {
    if (dup_factor_count[i] < factor_count[i]) {
      check = 0;
    }
  }
  if (check) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}
