#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  while (a != 0 && b != 0) {
    if (a > b) {
      a %= b;
    } else {
      b %= a;
    }
  }
  return a + b;
}
int main(int argc, const char* argv[]) {
  int n, k;
  cin >> n >> k;
  int cur = 1;
  for (int i = 0; i < n; i++) {
    int x;
    scanf("%d", &x);
    x /= gcd(cur, x);
    cur *= gcd(x, k);
    k /= gcd(x, k);
  }
  if (k == 1) {
    cout << "Yes";
  } else {
    cout << "No";
  }
  return 0;
}
