#include <bits/stdc++.h>
using namespace std;
int n, k, i, d, x, P[1000005], E[1000005], cnt, j;
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> k;
  for (i = 2; i <= 1000000; i++)
    if (E[i] == 0) {
      E[i] = i;
      for (j = i + i; j <= 1000000; j += i) E[j] = i;
    }
  for (i = 1; i <= n; i++) {
    cin >> x;
    while (x > 1) {
      d = E[x];
      cnt = 0;
      while (x % d == 0) {
        x /= d;
        cnt++;
      }
      P[d] = max(P[d], cnt);
    }
  }
  while (k > 1) {
    d = E[k];
    while (k % d == 0) {
      k /= d;
      P[d]--;
      if (P[d] < 0) {
        cout << "No\n";
        return 0;
      }
    }
  }
  cout << "Yes\n";
  return 0;
}
