#include <bits/stdc++.h>
using namespace std;
int c[1000000];
vector<pair<int, int> > factors;
void factor(int n) {
  for (int i = 2; i <= sqrt(n); i++) {
    int count = 0;
    if (n % i == 0) {
      while (n % i == 0) {
        n = n / i;
        count++;
      }
      factors.push_back(make_pair(i, count));
    }
  }
  if (n > 1) factors.push_back(make_pair(n, 1));
}
int main() {
  int n, k;
  scanf("%d %d", &n, &k);
  for (int i = 0; i < n; i++) {
    scanf("%d", &c[i]);
  }
  factor(k);
  for (auto q : factors) {
    bool test = false;
    for (int i = 0; i < n; i++) {
      if (c[i] == 1) continue;
      int count = 0;
      int k = c[i];
      while (k % q.first == 0) {
        k = k / q.first;
        count++;
      }
      if (count >= q.second) {
        test = true;
      }
    }
    if (!test) {
      cout << "No";
      return 0;
    }
  }
  cout << "Yes";
  return 0;
}
