#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1);
const long long INF = (1LL << 60);
int a[1000005], was[1000005];
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  bool win = false;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    if (a[i] % k == 0) win = true;
    was[a[i]]++;
  }
  if (win) {
    puts("Yes");
    return 0;
  }
  for (long long i = 2; i * i <= k; i++) {
    long long cur = 1;
    while (k % i == 0) k /= i, cur *= i;
    bool flag = false;
    if (cur == 1) continue;
    for (long long j = 1; j * cur <= 1000000; j++) {
      if (was[j * cur]) {
        flag = true;
        break;
      }
    }
    if (!flag) {
      puts("No");
      return 0;
    }
  }
  if (k > 1) {
    bool flag = false;
    for (long long j = 1; j * k <= 1000000; j++) {
      if (was[j * k]) {
        flag = true;
        break;
      }
    }
    if (!flag) {
      puts("No");
      return 0;
    }
  }
  puts("Yes");
  return 0;
}
