#include <bits/stdc++.h>
using namespace std;
inline long long gcd(long long x, long long y) {
  return !y ? x : gcd(y, x % y);
}
inline long long lcm(long long x, long long y) { return x * y / gcd(x, y); }
int main() {
  int n;
  long long k, _lcm = 1;
  scanf("%d %lld", &n, &k);
  for (int i = 1; i <= n; i++) {
    long long x;
    scanf("%lld", &x);
    _lcm = lcm(_lcm, x);
    _lcm %= k;
  }
  puts(!_lcm ? "Yes" : "No");
  return 0;
}
