#include <bits/stdc++.h>
using namespace std;
const int unplaced = 0;
int cnt[1000006];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n, k;
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    cnt[x]++;
  }
  bool fnf = true;
  for (int i = 2; i <= sqrt(k); i++) {
    if (k % i == 0) {
      int c = 1;
      while (k % i == 0) {
        c *= i;
        k /= i;
      }
      bool cool = false;
      for (int j = 1; j * c <= 1000001; j++) {
        if (cnt[j * c] >= 1) {
          cool = true;
          break;
        }
      }
      if (!cool) {
        fnf = false;
        break;
      }
    }
  }
  if (k > 1) {
    bool cool = false;
    for (int j = 1; j * k <= 1000001; j++) {
      if (cnt[j * k] >= 1) {
        cool = true;
        break;
      }
    }
    if (!cool) {
      fnf = false;
    }
  }
  if (fnf) {
    cout << "Yes" << '\n';
    ;
  } else {
    cout << "No" << '\n';
    ;
  }
  return unplaced;
}
