#include <bits/stdc++.h>
using namespace std;
int c[1000005];
int main() {
  int i, j, k;
  int n;
  scanf("%d", &n);
  scanf("%d", &k);
  for (i = 1; i <= n; i++) {
    scanf("%d", &c[i]);
  }
  int x = sqrt(k);
  for (i = 2; i <= x; i++) {
    int temp = 0;
    while (k % i == 0) {
      temp++;
      k /= i;
    }
    if (temp != 0) {
      int temp3 = 0;
      for (j = 1; j <= n; j++) {
        int temp2 = 0;
        while (c[j] % i == 0) {
          c[j] /= i;
          temp2++;
        }
        temp3 = max(temp3, temp2);
      }
      if (temp > temp3) {
        printf("No\n");
        return 0;
      }
    }
  }
  if (k != 1) {
    int temp = 1;
    if (temp != 0) {
      int temp3 = 0;
      for (j = 1; j <= n; j++) {
        int temp2 = 0;
        while (c[j] % k == 0) {
          c[j] /= k;
          temp2++;
        }
        temp3 = max(temp3, temp2);
      }
      if (temp > temp3) {
        printf("No\n");
        return 0;
      }
    }
  }
  printf("Yes\n");
  return 0;
}
