#include <bits/stdc++.h>
using namespace std;
long long k, n, num = 0;
long long c[1000005];
long long p[100], q[100];
long long g(long long x, long long y) {
  if (x == 0) return y;
  return g(y % x, x);
}
int main() {
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    long long x;
    scanf("%I64d", &x);
    if (k == 1 || k == x || x % k == 0) {
      cout << "Yes";
      return 0;
    }
    if (g(k, x) > 1) {
      num++;
      c[num] = x;
    }
  }
  int temp = 0;
  for (int i = 2; i <= k; i++) {
    if (k % i == 0) {
      int cur = 1;
      temp++;
      while (k % i == 0) {
        cur *= i;
        k /= i;
      }
      q[temp] = cur;
    }
  }
  int check[100] = {0};
  for (int i = 1; i <= num; i++) {
    for (int j = 1; j <= temp; j++) {
      if (c[i] % q[j] == 0) check[j] = 1;
    }
  }
  int t = 0;
  for (int i = 0; i <= temp; i++) {
    if (check[i]) t++;
  }
  if (t == temp)
    cout << "Yes";
  else
    cout << "No";
  return 0;
}
