#include <bits/stdc++.h>
using namespace std;
long long n, m, lcm, k, c;
long long GCD(long long a, long long b) { return b == 0 ? a : GCD(b, a % b); }
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> m;
  lcm = 1;
  for (int i = 0; i < n; i++) {
    cin >> c;
    if (!lcm) continue;
    lcm = (c * lcm) / GCD(lcm, c);
    lcm %= m;
  }
  if (lcm)
    cout << "No" << endl;
  else
    cout << "Yes" << endl;
  return 0;
}
