#include <bits/stdc++.h>
using namespace std;
const int maxn = 5e5;
int a[maxn], b[maxn], c[maxn];
int n, K, i, j, x, y, bl, la;
int main() {
  scanf("%d%d", &n, &K);
  x = K;
  for (i = 2; i <= x; i++)
    if (x % i == 0) {
      a[++la] = i;
      while (x % i == 0) {
        b[la]++;
        x /= i;
      }
    }
  for (i = 1; i <= n; i++) {
    scanf("%d", &x);
    for (j = 1; j <= la; j++) {
      y = 0;
      while (x % a[j] == 0) {
        y++;
        x /= a[j];
      }
      c[j] = max(c[j], y);
    }
  }
  bl = 1;
  for (i = 1; i <= la; i++)
    if (c[i] < b[i]) {
      bl = 0;
      break;
    }
  if (bl)
    printf("Yes");
  else
    printf("No");
  return 0;
}
