#include <bits/stdc++.h>
using namespace std;
vector<int> v;
int ck[1000005];
int n, k, ans;
void go(int num) {
  int sz = v.size();
  for (int i = 0; i < sz; i++) {
    int cnt = 0;
    while (num % v[i] == 0) {
      ++cnt;
      num /= v[i];
    }
    ck[v[i]] = max(ck[v[i]], cnt);
  }
}
int main() {
  scanf("%d %d", &n, &k);
  int val = k;
  for (int i = 2; i * i <= val; i++) {
    while (k % i == 0) v.push_back(i), k /= i;
  }
  if (k != 1) v.push_back(k);
  for (int a, i = 1; i <= n; i++) {
    scanf("%d", &a);
    go(a);
  }
  int pi = val;
  for (int i = 2; i * i <= pi; i++) {
    while (val % i == 0) {
      val /= i;
      --ck[i];
    }
    if (ck[i] < 0) {
      puts("No");
      return 0;
    }
  }
  if (val != 1) {
    if (--ck[val] < 0) {
      puts("No");
      return 0;
    }
  }
  puts("Yes");
}
