#include <bits/stdc++.h>
using namespace std;
int n, k;
long long num[1000010];
long long gcd(long long a, long long b) {
  if (a < b) swap(a, b);
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int i, j;
  scanf("%d%d", &n, &k);
  bool ans = 0;
  long long now = 1;
  for (i = 1; i <= n; i++) {
    scanf("%lld", &num[i]);
  }
  for (i = 1; i <= n; i++) {
    long long temp = gcd(now, num[i]);
    now = (now * num[i] / temp) % k;
    if (now == 0) {
      ans = 1;
      break;
    }
  }
  if (ans == 1)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
