#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  return a % b == 0 ? b : gcd(b, a % b);
}
long long lcm(long long a, long long b) { return (a / gcd(a, b)) * b; }
int main() {
  long long n, k;
  cin >> n >> k;
  long long prev;
  scanf("%lld", &prev);
  for (int i = 1; i < n; i++) {
    long long aux;
    scanf("%lld", &aux);
    prev = lcm(aux, prev);
    prev = gcd(prev, k);
  }
  if (prev % k == 0)
    printf("Yes\n");
  else
    printf("No\n");
  return 0;
}
