#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return a == 0 ? b : gcd(b % a, a); }
long long lcm(long long a, long long b) { return a * b / gcd(a, b); }
int main() {
  long long n, k;
  long long a, ans;
  int flag = 0;
  while (~scanf("%lld%lld", &n, &k)) {
    ans = 1;
    for (int i = 1; i <= n; i++) {
      scanf("%lld", &a);
      ans = lcm(ans, a);
      ans = gcd(ans, k);
      if (ans == k) {
        flag = 1;
      }
    }
    if (flag == 1)
      printf("YES");
    else
      printf("NO");
  }
}
