#include <bits/stdc++.h>
using namespace std;
int lp[1000000 + 5];
int cnt[1000000 + 5];
int main() {
  int i, j, v;
  int m = 1;
  for (i = 2; i <= 1000000; i++)
    if (!lp[i])
      for (j = i; j <= 1000000; j += i) lp[j] = i;
  int n, k;
  scanf("%d %d", &n, &k);
  for (i = 1; i <= n; i++) {
    scanf("%d", &v);
    while (v != 1) {
      int cp = lp[v], c = 0;
      while (v % cp == 0) {
        v /= cp;
        c++;
      }
      cnt[cp] = max(cnt[cp], c);
    }
  }
  for (i = 2; i <= 1000000; i++)
    for (j = 1; j <= cnt[i]; j++) m = ((long long int)m * i) % k;
  m = m % k;
  if (!m)
    puts("Yes");
  else
    puts("No");
  return 0;
}
