#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000009;
int n, k;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
int main() {
  long long tmp = 1;
  long long lcm = 1;
  scanf("%d%d", &n, &k);
  for (int i = 0; i < n; i++) {
    scanf("%I64d", &tmp);
    long long d = gcd(lcm, tmp);
    lcm = lcm * tmp / d;
    lcm %= k;
  }
  printf(lcm == 0 ? "Yes" : "No");
}
