#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
int main() {
  int n, m;
  cin >> n >> m;
  long long ans = 1, res;
  while (n--) {
    scanf("%I64d", &res);
    ans = ans / gcd(res, ans) * res % m;
  }
  if (ans % m)
    cout << "No" << endl;
  else
    cout << "Yes" << endl;
}
