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