#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;

#ifndef ONLINE_JUDGE
//auto __redirect__ = freopen("in", "r", stdin);
#endif

#define ln '\n'
#define lsb(x) (x&-x)
#define del(x) if(x) delete x

#define rep(i,a,b) for(int i = a; i < b; ++i)
#define repq(i,a,b) for(int i = a; i <= b; ++i)

#define rev(i,a,b) for(int i = a; i >= b; --i)
#define revn(i,a,b) for(int i = a; i > b; --i)

#define repc(i,a,cond) for(int i = a; cond; ++i)
#define revc(i,a,cond) for(int i = a; cond; --i)

int const N = 1e5 + 16;
int const M = 1e9 + 7;

int n, k;

int main() {
  scanf("%d%d", &n, &k);
  bool okay = false;
  while(n--) {
    int c;
    scanf("%d", &c);
    if(c == k || c % k == 0) {
      okay = true;
      break;
    }

  }

  if(okay)
    puts("Yes");
  else
    puts("No");

}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;

#ifndef ONLINE_JUDGE
//auto __redirect__ = freopen("in", "r", stdin);
#endif

#define ln '\n'
#define lsb(x) (x&-x)
#define del(x) if(x) delete x

#define rep(i,a,b) for(int i = a; i < b; ++i)
#define repq(i,a,b) for(int i = a; i <= b; ++i)

#define rev(i,a,b) for(int i = a; i >= b; --i)
#define revn(i,a,b) for(int i = a; i > b; --i)

#define repc(i,a,cond) for(int i = a; cond; ++i)
#define revc(i,a,cond) for(int i = a; cond; --i)

int const N = 1e6 + 16;
int const M = 1e9 + 7;

int n, k;

ll lcm(ll x, ll y) {
  return x / __gcd(x, y) * y;
}

int main() {
  scanf("%d%d", &n, &k);
  bool okay = false;
  ll p = 1;
  rep(i,0,n) {
    int x;
    scanf("%d", &x);
    p = __gcd(k, lcm(p, x));
  }

  if(p == k)
    puts("Yes");
  else
    puts("No");

}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;

#ifndef ONLINE_JUDGE
//auto __redirect__ = freopen("in", "r", stdin);
#endif

#define ln '\n'
#define lsb(x) (x&-x)
#define del(x) if(x) delete x

#define rep(i,a,b) for(int i = a; i < b; ++i)
#define repq(i,a,b) for(int i = a; i <= b; ++i)

#define rev(i,a,b) for(int i = a; i >= b; --i)
#define revn(i,a,b) for(int i = a; i > b; --i)

#define repc(i,a,cond) for(int i = a; cond; ++i)
#define revc(i,a,cond) for(int i = a; cond; --i)

int const N = 1e5 + 16;
int const M = 1e9 + 7;

int n, k;

int main() {
  scanf("%d%d", &n, &k);
  bool okay = false;
  while(n--) {
    int c;
    scanf("%d", &c);
    if(c == k || c % k == 0) {
      okay = true;
      break;
    }

  }

  if(okay || k==1)
    puts("Yes");
  else
    puts("No");

}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;

#ifndef ONLINE_JUDGE
//auto __redirect__ = freopen("in", "r", stdin);
#endif

#define ln '\n'
#define lsb(x) (x&-x)
#define del(x) if(x) delete x

#define rep(i,a,b) for(int i = a; i < b; ++i)
#define repq(i,a,b) for(int i = a; i <= b; ++i)

#define rev(i,a,b) for(int i = a; i >= b; --i)
#define revn(i,a,b) for(int i = a; i > b; --i)

#define repc(i,a,cond) for(int i = a; cond; ++i)
#define revc(i,a,cond) for(int i = a; cond; --i)

int const N = 1e5 + 16;
int const M = 1e9 + 7;

int n, k;

int main() {
  scanf("%d%d", &n, &k);
  bool okay = false;
  while(n--) {
    int c;
    scanf("%d", &c);
    if(c == k) {
      okay = true;
      break;
    }

  }

  if(okay || k == 1)
    puts("Yes");
  else
    puts("No");

}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;

#ifndef ONLINE_JUDGE
//auto __redirect__ = freopen("in", "r", stdin);
#endif

#define ln '\n'
#define lsb(x) (x&-x)
#define del(x) if(x) delete x

#define rep(i,a,b) for(int i = a; i < b; ++i)
#define repq(i,a,b) for(int i = a; i <= b; ++i)

#define rev(i,a,b) for(int i = a; i >= b; --i)
#define revn(i,a,b) for(int i = a; i > b; --i)

#define repc(i,a,cond) for(int i = a; cond; ++i)
#define revc(i,a,cond) for(int i = a; cond; --i)

int const N = 1e5 + 16;
int const M = 1e9 + 7;

int n, k;

int main() {
  scanf("%d%d", &n, &k);
  bool okay = false;
  while(n--) {
    int c;
    scanf("%d", &c);
    if(c == k || k % c == 0)) {
      okay = true;
      break;
    }

  }

  if(okay)
    puts("Yes");
  else
    puts("No");

}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;

#ifndef ONLINE_JUDGE
//auto __redirect__ = freopen("in", "r", stdin);
#endif

#define ln '\n'
#define lsb(x) (x&-x)
#define del(x) if(x) delete x

#define rep(i,a,b) for(int i = a; i < b; ++i)
#define repq(i,a,b) for(int i = a; i <= b; ++i)

#define rev(i,a,b) for(int i = a; i >= b; --i)
#define revn(i,a,b) for(int i = a; i > b; --i)

#define repc(i,a,cond) for(int i = a; cond; ++i)
#define revc(i,a,cond) for(int i = a; cond; --i)

int const N = 1e5 + 16;
int const M = 1e9 + 7;

int n, k;

int main() {
  scanf("%d%d", &n, &k);
  bool okay = false;
  set<int> rem;
  while(n--) {
    int c;
    scanf("%d", &c);
    if(c == k || c % k == 0 || k % c == 0) {
      okay = true;
      break;
    }
    rem.insert(c);
  }
  for(auto x : rem)
    if(k % x == 0) {
      okay = true;
      break;
    }

  if(okay)
    puts("Yes");
  else
    puts("No");

}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;

#ifndef ONLINE_JUDGE
//auto __redirect__ = freopen("in", "r", stdin);
#endif

#define ln '\n'
#define lsb(x) (x&-x)
#define del(x) if(x) delete x

#define rep(i,a,b) for(int i = a; i < b; ++i)
#define repq(i,a,b) for(int i = a; i <= b; ++i)

#define rev(i,a,b) for(int i = a; i >= b; --i)
#define revn(i,a,b) for(int i = a; i > b; --i)

#define repc(i,a,cond) for(int i = a; cond; ++i)
#define revc(i,a,cond) for(int i = a; cond; --i)

int const N = 1e6 + 16;
int const M = 1e9 + 7;

int n;
ll k;

ll lcm(ll x, ll y) {
  return x / __gcd(x, y) * y;
}

int main() {
  scanf("%d%lld", &n, &k);
  bool okay = false;
  ll p = 1;
  rep(i,0,n) {
    int x;
    scanf("%d", &x);
    p = __gcd(k, lcm(p, x));
  }

  if(p == k)
    puts("Yes");
  else
    puts("No");

}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;

#ifndef ONLINE_JUDGE
//auto __redirect__ = freopen("in", "r", stdin);
#endif

#define ln '\n'
#define lsb(x) (x&-x)
#define del(x) if(x) delete x

#define rep(i,a,b) for(int i = a; i < b; ++i)
#define repq(i,a,b) for(int i = a; i <= b; ++i)

#define rev(i,a,b) for(int i = a; i >= b; --i)
#define revn(i,a,b) for(int i = a; i > b; --i)

#define repc(i,a,cond) for(int i = a; cond; ++i)
#define revc(i,a,cond) for(int i = a; cond; --i)

int const N = 1e6 + 16;
int const M = 1e9 + 7;

int n, k;

int lcm(int x, int y) {
  return x / __gcd(x, y) * y;
}

int main() {
  scanf("%d%d", &n, &k);
  bool okay = false;
  int p = 1;
  rep(i,0,n) {
    int x;
    scanf("%d", &x);
    p = __gcd(k, lcm(p, x));
  }

  if(p == k)
    puts("Yes");
  else
    puts("No");

}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;

#ifndef ONLINE_JUDGE
//auto __redirect__ = freopen("in", "r", stdin);
#endif

#define ln '\n'
#define lsb(x) (x&-x)
#define del(x) if(x) delete x

#define rep(i,a,b) for(int i = a; i < b; ++i)
#define repq(i,a,b) for(int i = a; i <= b; ++i)

#define rev(i,a,b) for(int i = a; i >= b; --i)
#define revn(i,a,b) for(int i = a; i > b; --i)

#define repc(i,a,cond) for(int i = a; cond; ++i)
#define revc(i,a,cond) for(int i = a; cond; --i)

int const N = 1e5 + 16;
int const M = 1e9 + 7;

int n, k;

int main() {
  scanf("%d%d", &n, &k);
  bool okay = false;
  set<int> rem;
  while(n--) {
    int c;
    scanf("%d", &c);
    if(c == k || c % k == 0 || k % c == 0) {
      okay = true;
      break;
    }
    rem.insert(c);
  }
  for(auto x : rem)
    if(k % i == 0) {
      okay = true;
      break;
    }

  if(okay)
    puts("Yes");
  else
    puts("No");

}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;

#ifndef ONLINE_JUDGE
//auto __redirect__ = freopen("in", "r", stdin);
#endif

#define ln '\n'
#define lsb(x) (x&-x)
#define del(x) if(x) delete x

#define rep(i,a,b) for(int i = a; i < b; ++i)
#define repq(i,a,b) for(int i = a; i <= b; ++i)

#define rev(i,a,b) for(int i = a; i >= b; --i)
#define revn(i,a,b) for(int i = a; i > b; --i)

#define repc(i,a,cond) for(int i = a; cond; ++i)
#define revc(i,a,cond) for(int i = a; cond; --i)

int const N = 1e6 + 16;
int const M = 1e9 + 7;

int n, k;

int lcm(ll x, ll y) {
  return x / __gcd(x, y) * y;
}

int main() {
  scanf("%d%d", &n, &k);
  bool okay = false;
  ll p = 1;
  rep(i,0,n) {
    int x;
    scanf("%d", &x);
    p = __gcd(k, lcm(p, x));
  }

  if(p == k)
    puts("Yes");
  else
    puts("No");

}


#include <bits/stdc++.h>

#ifdef LOCAL_COMP
#define VA_NUM_ARGS(...) VA_NUM_ARGS_IMPL(0,__VA_ARGS__, 5,4,3,2,1)
#define VA_NUM_ARGS_IMPL(_0,_1,_2,_3,_4,_5,N,...) N

#define macro_dispatcher(macro, ...) macro_dispatcher_(macro, VA_NUM_ARGS(__VA_ARGS__))
#define macro_dispatcher_(macro, nargs) macro_dispatcher__(macro, nargs)
#define macro_dispatcher__(macro, nargs) macro ## nargs

#define debug(...) macro_dispatcher(debug, __VA_ARGS__)(__VA_ARGS__)

#define debug1(a)       cout<< #a << " = " << (a) << endl
#define debug2(a,b)     cout<< #a << " = " << (a) << "  " << #b << " = " << (b) << endl
#define debug3(a,b,c)   cout<< #a << " = " << (a) << "  " << #b << " = " << (b) << "  " \
  << #c << " = " << (c) << endl
#define debug4(a,b,c,d) cout<< #a << " = " << (a) << "  " << #b << " = " << (b) << "  " \
  << #c << " = " << (c) << "  " << #d << " = " << (d) << endl
#else
#define debug(...)
#endif

using namespace std;

typedef long long T;

vector<T> calc_primes(int k) {
  vector<T> lp(k + 1, 0);
  vector<T> primes;
  for (int i = 2; i < k; ++i) {
    if (lp[i] == 0) {
      primes.push_back(i);
      lp[i] = i;
    }
    for (T p : primes) {
      if (i * p > k || lp[i] > p) {
        break;
      }
      lp[i * p] = p;
    }
  }
  return lp;
}

vector<pair<T, int> > factorize(T n, const vector<T> &lp) {
  vector<pair<T, int> > ret;
  while (n != 0) {
    T p = lp[n];
    if (p == 0) {
      ret.emplace_back(n, 1);
      break;
    }
    ret.emplace_back(p, 0);
    while (lp[n] == p) {
      ret.back().second += 1;
      n /= p;
    }
  }
  return ret;
}

T gcd(T a, T b) {
  while (b > 0) {
    a %= b;
    swap(a, b);
  }
  return a;
}

T calc_lcm(T a, T b) {
  T g = gcd(a, b);
  return (a / g) * b;
}

T get_lcm(const vector<T> &a, const T k) {
  T lcm = a[0];
  for (int i = 1; i < a.size(); ++i) {
    lcm = calc_lcm(lcm, a[i]);
    if (lcm > k) {
      break;
    }
  }
  return lcm;
}

void solve(int n) {
  T k;
  {
    int kk; scanf("%d", &kk);
    k = kk;
  }

  vector<T> coefs(n);
  for (int i = 0; i < n; ++i) {
    int cur; scanf("%d", &cur);
    coefs[i] = cur;
  }

#if 1
  const vector<T> lp = calc_primes(k);

#if 0
  map<T, int> eq;
  for (int i = 0; i < n; ++i) {
    T c = coefs[i];

    auto facts = factorize(c, primes);

    for (const pair<T, int> &f : facts) {
      auto it = eq.find(f.first);
      if (it == eq.end()) {
        eq[f.first] = f.second;
      } else {
        it->second = std::max(it->second, f.second);
      }
    }
  }

  T mul = 1;

  for (const pair<T, int> &e : eq) {
    for (int i = 0; i < e.second; ++i) {
      mul *= e.first;
      if (mul > k) {
        break;
      }
    }
    if (mul > k) {
      break;
    }
  }
#else
  auto k_facts = factorize(k, lp);
  map<T, int> k_set(k_facts.begin(), k_facts.end());

  for (int i = 0; i < n; ++i) {
    T c = coefs[i];

    auto facts = factorize(c, lp);
    for (const pair<T, int> &f : facts) {
      auto it = k_set.find(f.first);
      if (it != k_set.end() && it->second <= f.second) {
        k_set.erase(it);
      }
    }
  }
  T mul = -1;
  if (k_set.empty()) {
    mul = k + 10;
  }
#endif

#else

#endif
//  debug(mul);
  if (mul >= k) {
    printf("Yes\n");
  } else {
    printf("No\n");
  }
}

int main() {
#ifdef LOCAL_COMP
  freopen("a.txt", "r", stdin);
#endif

#if 0
  ios_base::sync_with_stdio(false);
  cin.tie(0);

//  for (int i = 1; i < 1000; ++i) {
//    debug(i, solve(to_string(i)));
//  }

  for (int n; cin >> n; ) {
//    cout << solve(n) << endl;
//    while(n--) {
      solve(n);
//    }
//    if (solve(n)) {
//      cout << "YES" << endl;
//    } else {
//      cout << "NO" << endl;
//    }
  }
  cout.flush();
#else
  int n;
  while (scanf("%d", &n) == 1) {
    solve(n);
  }
#endif

  return 0;
}


#include <bits/stdc++.h>

#ifdef LOCAL_COMP
#define VA_NUM_ARGS(...) VA_NUM_ARGS_IMPL(0,__VA_ARGS__, 5,4,3,2,1)
#define VA_NUM_ARGS_IMPL(_0,_1,_2,_3,_4,_5,N,...) N

#define macro_dispatcher(macro, ...) macro_dispatcher_(macro, VA_NUM_ARGS(__VA_ARGS__))
#define macro_dispatcher_(macro, nargs) macro_dispatcher__(macro, nargs)
#define macro_dispatcher__(macro, nargs) macro ## nargs

#define debug(...) macro_dispatcher(debug, __VA_ARGS__)(__VA_ARGS__)

#define debug1(a)       cout<< #a << " = " << (a) << endl
#define debug2(a,b)     cout<< #a << " = " << (a) << "  " << #b << " = " << (b) << endl
#define debug3(a,b,c)   cout<< #a << " = " << (a) << "  " << #b << " = " << (b) << "  " \
  << #c << " = " << (c) << endl
#define debug4(a,b,c,d) cout<< #a << " = " << (a) << "  " << #b << " = " << (b) << "  " \
  << #c << " = " << (c) << "  " << #d << " = " << (d) << endl
#else
#define debug(...)
#endif

using namespace std;

typedef long long T;

vector<T> calc_primes(int k) {
  vector<bool> sieve(k + 1, true);
  vector<T> primes;
  for (int i = 2; i < sieve.size(); ++i) {
    if (sieve[i]) {
      primes.push_back(i);
      for (int j = i + i; j < sieve.size(); j += i) {
        sieve[j] = false;
      }
    }
  }
  return primes;
}

vector<pair<T, int> > factorize(T n, const vector<T> &primes) {
  vector<pair<T, int> > ret;
  for (int k = 0; k < primes.size(); ++k) {
    T p = primes[k];
    if (p * p > n) {
      break;
    }
    if (n % p == 0) {
      ret.emplace_back(p, 0);
      while (n % p == 0) {
        ret.back().second += 1;
        n /= p;
      }
    }
  }
  if (n != 1) {
    ret.emplace_back(n, 1);
  }
  return ret;
}

T gcd(T a, T b) {
  while (b > 0) {
    a %= b;
    swap(a, b);
  }
  return a;
}

T calc_lcm(T a, T b) {
  T g = gcd(a, b);
  return (a / g) * b;
}

T get_lcm(const vector<T> &a, const T k) {
  T lcm = a[0];
  for (int i = 1; i < a.size(); ++i) {
    lcm = calc_lcm(lcm, a[i]);
    if (lcm > k) {
      break;
    }
  }
  return lcm;
}

T stupid(vector<T> coefs, T k) {
  for (T x = 0; x; ++x) {

  }
}

void solve(int n) {
  T k;
  {
    int kk; scanf("%d", &kk);
    k = kk;
  }

  vector<T> coefs(n);
  for (int i = 0; i < n; ++i) {
    int cur; scanf("%d", &cur);
    coefs[i] = cur;
  }

#if 1
  const vector<T> primes = calc_primes(k);

#if 0
  map<T, int> eq;
  for (int i = 0; i < n; ++i) {
    T c = coefs[i];

    auto facts = factorize(c, primes);

    for (const pair<T, int> &f : facts) {
      auto it = eq.find(f.first);
      if (it == eq.end()) {
        eq[f.first] = f.second;
      } else {
        it->second = std::max(it->second, f.second);
      }
    }
  }

  T mul = 1;

  for (const pair<T, int> &e : eq) {
    for (int i = 0; i < e.second; ++i) {
      mul *= e.first;
      if (mul > k) {
        break;
      }
    }
    if (mul > k) {
      break;
    }
  }
#else
  auto k_facts = factorize(k, primes);
  set<pair<T, int> > k_set(k_facts.begin(), k_facts.end());

  for (int i = 0; i < n; ++i) {
    T c = coefs[i];

    auto facts = factorize(c, primes);
    for (const pair<T, int> &f : facts) {
      k_set.erase(f);
    }
  }
  T mul = -1;
  if (k_set.empty()) {
    mul = k + 10;
  }
#endif

#else

#endif
//  debug(mul);
  if (mul >= k) {
    printf("Yes\n");
  } else {
    printf("No\n");
  }
}

int main() {
#ifdef LOCAL_COMP
  freopen("a.txt", "r", stdin);
#endif

#if 0
  ios_base::sync_with_stdio(false);
  cin.tie(0);

//  for (int i = 1; i < 1000; ++i) {
//    debug(i, solve(to_string(i)));
//  }

  for (int n; cin >> n; ) {
//    cout << solve(n) << endl;
//    while(n--) {
      solve(n);
//    }
//    if (solve(n)) {
//      cout << "YES" << endl;
//    } else {
//      cout << "NO" << endl;
//    }
  }
  cout.flush();
#else
  int n;
  while (scanf("%d", &n) == 1) {
    solve(n);
  }
#endif

  return 0;
}


#include <bits/stdc++.h>

#ifdef LOCAL_COMP
#define VA_NUM_ARGS(...) VA_NUM_ARGS_IMPL(0,__VA_ARGS__, 5,4,3,2,1)
#define VA_NUM_ARGS_IMPL(_0,_1,_2,_3,_4,_5,N,...) N

#define macro_dispatcher(macro, ...) macro_dispatcher_(macro, VA_NUM_ARGS(__VA_ARGS__))
#define macro_dispatcher_(macro, nargs) macro_dispatcher__(macro, nargs)
#define macro_dispatcher__(macro, nargs) macro ## nargs

#define debug(...) macro_dispatcher(debug, __VA_ARGS__)(__VA_ARGS__)

#define debug1(a)       cout<< #a << " = " << (a) << endl
#define debug2(a,b)     cout<< #a << " = " << (a) << "  " << #b << " = " << (b) << endl
#define debug3(a,b,c)   cout<< #a << " = " << (a) << "  " << #b << " = " << (b) << "  " \
  << #c << " = " << (c) << endl
#define debug4(a,b,c,d) cout<< #a << " = " << (a) << "  " << #b << " = " << (b) << "  " \
  << #c << " = " << (c) << "  " << #d << " = " << (d) << endl
#else
#define debug(...)
#endif

using namespace std;

typedef long long T;

vector<T> calc_primes(int k) {
  vector<bool> sieve(k + 1, true);
  vector<T> primes;
  for (int i = 2; i < sieve.size(); ++i) {
    if (sieve[i]) {
      primes.push_back(i);
      for (int j = i + i; j < sieve.size(); j += i) {
        sieve[j] = false;
      }
    }
  }
  return primes;
}

vector<pair<T, int> > factorize(T n, const vector<T> &primes) {
  vector<pair<T, int> > ret;
  for (int k = 0; k < primes.size(); ++k) {
    T p = primes[k];
    if (p * p > n) {
      break;
    }
    if (n % p == 0) {
      ret.emplace_back(p, 0);
      while (n % p == 0) {
        ret.back().second += 1;
        n /= p;
      }
    }
  }
  if (n != 1) {
    ret.emplace_back(n, 1);
  }
  return ret;
}

T calc_lcm(T a, T b) {
  T g = __gcd(a, b);
  return (a / g) * b;
}

T get_lcm(const vector<T> &a, const T k) {
  T lcm = a[0];
  for (int i = 1; i < a.size(); ++i) {
    lcm = calc_lcm(lcm, a[i]);
    if (lcm > k) {
      break;
    }
  }
  return lcm;
}

void solve(int n) {
  T k;
  {
    int kk; scanf("%d", &kk);
    k = kk;
  }

  vector<T> coefs(n);
  for (int i = 0; i < n; ++i) {
    int cur; scanf("%d", &cur);
    coefs[i] = cur;
  }

#if 0
  const vector<T> primes = calc_primes(k);

  map<T, int> eq;

  for (int i = 0; i < n; ++i) {
    T c = coefs[i];

    auto facts = factorize(c, primes);

    for (const pair<T, int> &f : facts) {
      auto it = eq.find(f.first);
      if (it == eq.end()) {
        eq[f.first] = f.second;
      } else {
        it->second = std::max(it->second, f.second);
      }
    }
  }

  T mul = 1;

  for (const pair<T, int> &e : eq) {
    for (int i = 0; i < 1; ++i) {
      mul *= e.first;
      if (mul > k) {
        break;
      }
    }
  }
#else
  T mul = get_lcm(coefs, k);

  if (mul > k) {
    printf("Yes\n");
  } else {
    printf("No\n");
  }
#endif
}

int main() {
#ifdef LOCAL_COMP
  freopen("a.txt", "r", stdin);
#endif

#if 0
  ios_base::sync_with_stdio(false);
  cin.tie(0);

//  for (int i = 1; i < 1000; ++i) {
//    debug(i, solve(to_string(i)));
//  }

  for (int n; cin >> n; ) {
//    cout << solve(n) << endl;
//    while(n--) {
      solve(n);
//    }
//    if (solve(n)) {
//      cout << "YES" << endl;
//    } else {
//      cout << "NO" << endl;
//    }
  }
  cout.flush();
#else
  int n;
  while (scanf("%d", &n) == 1) {
    solve(n);
  }
#endif

  return 0;
}


#include <bits/stdc++.h>

#ifdef LOCAL_COMP
#define VA_NUM_ARGS(...) VA_NUM_ARGS_IMPL(0,__VA_ARGS__, 5,4,3,2,1)
#define VA_NUM_ARGS_IMPL(_0,_1,_2,_3,_4,_5,N,...) N

#define macro_dispatcher(macro, ...) macro_dispatcher_(macro, VA_NUM_ARGS(__VA_ARGS__))
#define macro_dispatcher_(macro, nargs) macro_dispatcher__(macro, nargs)
#define macro_dispatcher__(macro, nargs) macro ## nargs

#define debug(...) macro_dispatcher(debug, __VA_ARGS__)(__VA_ARGS__)

#define debug1(a)       cout<< #a << " = " << (a) << endl
#define debug2(a,b)     cout<< #a << " = " << (a) << "  " << #b << " = " << (b) << endl
#define debug3(a,b,c)   cout<< #a << " = " << (a) << "  " << #b << " = " << (b) << "  " \
  << #c << " = " << (c) << endl
#define debug4(a,b,c,d) cout<< #a << " = " << (a) << "  " << #b << " = " << (b) << "  " \
  << #c << " = " << (c) << "  " << #d << " = " << (d) << endl
#else
#define debug(...)
#endif

using namespace std;

typedef long long T;

vector<T> calc_primes(int k) {
  vector<bool> sieve(k + 1, true);
  vector<T> primes;
  for (int i = 2; i < sieve.size(); ++i) {
    if (sieve[i]) {
      primes.push_back(i);
      for (int j = i + i; j < sieve.size(); j += i) {
        sieve[j] = false;
      }
    }
  }
  return primes;
}

vector<pair<T, int> > factorize(T n, const vector<T> &primes) {
  vector<pair<T, int> > ret;
  for (int k = 0; k < primes.size(); ++k) {
    T p = primes[k];
    if (p * p > n) {
      break;
    }
    if (n % p == 0) {
      ret.emplace_back(p, 0);
      while (n % p == 0) {
        ret.back().second += 1;
        n /= p;
      }
    }
  }
  if (n != 1) {
    ret.emplace_back(n, 1);
  }
  return ret;
}

T gcd(T a, T b) {
  while (b > 0) {
    a %= b;
    swap(a, b);
  }
  return a;
}

T calc_lcm(T a, T b) {
  T g = gcd(a, b);
  return (a / g) * b;
}

T get_lcm(const vector<T> &a, const T k) {
  T lcm = a[0];
  for (int i = 1; i < a.size(); ++i) {
    lcm = calc_lcm(lcm, a[i]);
    if (lcm > k) {
      break;
    }
  }
  return lcm;
}

T stupid(vector<T> coefs, T k) {
  for (T x = 0; x; ++x) {

  }
}

void solve(int n) {
  T k;
  {
    int kk; scanf("%d", &kk);
    k = kk;
  }

  vector<T> coefs(n);
  for (int i = 0; i < n; ++i) {
    int cur; scanf("%d", &cur);
    coefs[i] = cur;
  }

#if 1
  const vector<T> primes = calc_primes(k);

#if 0
  map<T, int> eq;
  for (int i = 0; i < n; ++i) {
    T c = coefs[i];

    auto facts = factorize(c, primes);

    for (const pair<T, int> &f : facts) {
      auto it = eq.find(f.first);
      if (it == eq.end()) {
        eq[f.first] = f.second;
      } else {
        it->second = std::max(it->second, f.second);
      }
    }
  }

  T mul = 1;

  for (const pair<T, int> &e : eq) {
    for (int i = 0; i < e.second; ++i) {
      mul *= e.first;
      if (mul > k) {
        break;
      }
    }
    if (mul > k) {
      break;
    }
  }
#else
  auto k_facts = factorize(k, primes);
  map<T, int> k_set(k_facts.begin(), k_facts.end());

  for (int i = 0; i < n; ++i) {
    T c = coefs[i];

    auto facts = factorize(c, primes);
    for (const pair<T, int> &f : facts) {
      auto it = k_set.find(f.first);
      if (it != k_set.end() && it->second <= f.second) {
        k_set.erase(it);
      }
    }
  }
  T mul = -1;
  if (k_set.empty()) {
    mul = k + 10;
  }
#endif

#else

#endif
//  debug(mul);
  if (mul >= k) {
    printf("Yes\n");
  } else {
    printf("No\n");
  }
}

int main() {
#ifdef LOCAL_COMP
  freopen("a.txt", "r", stdin);
#endif

#if 0
  ios_base::sync_with_stdio(false);
  cin.tie(0);

//  for (int i = 1; i < 1000; ++i) {
//    debug(i, solve(to_string(i)));
//  }

  for (int n; cin >> n; ) {
//    cout << solve(n) << endl;
//    while(n--) {
      solve(n);
//    }
//    if (solve(n)) {
//      cout << "YES" << endl;
//    } else {
//      cout << "NO" << endl;
//    }
  }
  cout.flush();
#else
  int n;
  while (scanf("%d", &n) == 1) {
    solve(n);
  }
#endif

  return 0;
}


#include <bits/stdc++.h>

#ifdef LOCAL_COMP
#define VA_NUM_ARGS(...) VA_NUM_ARGS_IMPL(0,__VA_ARGS__, 5,4,3,2,1)
#define VA_NUM_ARGS_IMPL(_0,_1,_2,_3,_4,_5,N,...) N

#define macro_dispatcher(macro, ...) macro_dispatcher_(macro, VA_NUM_ARGS(__VA_ARGS__))
#define macro_dispatcher_(macro, nargs) macro_dispatcher__(macro, nargs)
#define macro_dispatcher__(macro, nargs) macro ## nargs

#define debug(...) macro_dispatcher(debug, __VA_ARGS__)(__VA_ARGS__)

#define debug1(a)       cout<< #a << " = " << (a) << endl
#define debug2(a,b)     cout<< #a << " = " << (a) << "  " << #b << " = " << (b) << endl
#define debug3(a,b,c)   cout<< #a << " = " << (a) << "  " << #b << " = " << (b) << "  " \
  << #c << " = " << (c) << endl
#define debug4(a,b,c,d) cout<< #a << " = " << (a) << "  " << #b << " = " << (b) << "  " \
  << #c << " = " << (c) << "  " << #d << " = " << (d) << endl
#else
#define debug(...)
#endif

using namespace std;

typedef long long T;

vector<T> calc_primes(int k) {
  vector<T> lp(k + 1, 0);
  vector<T> primes;
  for (int i = 2; i < k; ++i) {
    if (lp[i] == 0) {
      primes.push_back(i);
      lp[i] = i;
    }
    for (T p : primes) {
      if (i * p > k || lp[i] < p) {
        break;
      }
      lp[i * p] = p;
    }
  }
  return lp;
}

vector<pair<T, int> > factorize(T n, const vector<T> &lp) {
  vector<pair<T, int> > ret;
  while (n > 1) {
    T p = lp[n];
    if (p == 0) {
      ret.emplace_back(n, 1);
      break;
    }
    ret.emplace_back(p, 0);
    while (lp[n] == p) {
      ret.back().second += 1;
      n /= p;
    }
  }
  return ret;
}

T gcd(T a, T b) {
  while (b > 0) {
    a %= b;
    swap(a, b);
  }
  return a;
}

T calc_lcm(T a, T b) {
  T g = gcd(a, b);
  return (a / g) * b;
}

T get_lcm(const vector<T> &a, const T k) {
  T lcm = a[0];
  for (int i = 1; i < a.size(); ++i) {
    lcm = calc_lcm(lcm, a[i]);
    if (lcm > k) {
      break;
    }
  }
  return lcm;
}

void solve(int n) {
  T k;
  {
    int kk; scanf("%d", &kk);
    k = kk;
  }

  vector<T> coefs(n);
  for (int i = 0; i < n; ++i) {
    int cur; scanf("%d", &cur);
    coefs[i] = cur;
  }

#if 1
  const vector<T> lp = calc_primes(1e6 + 1);

#if 0
  map<T, int> eq;
  for (int i = 0; i < n; ++i) {
    T c = coefs[i];

    auto facts = factorize(c, primes);

    for (const pair<T, int> &f : facts) {
      auto it = eq.find(f.first);
      if (it == eq.end()) {
        eq[f.first] = f.second;
      } else {
        it->second = std::max(it->second, f.second);
      }
    }
  }

  T mul = 1;

  for (const pair<T, int> &e : eq) {
    for (int i = 0; i < e.second; ++i) {
      mul *= e.first;
      if (mul > k) {
        break;
      }
    }
    if (mul > k) {
      break;
    }
  }
#else
  auto k_facts = factorize(k, lp);
  map<T, int> k_set(k_facts.begin(), k_facts.end());

  for (int i = 0; i < n; ++i) {
    T c = coefs[i];

    auto facts = factorize(c, lp);
    for (const pair<T, int> &f : facts) {
      auto it = k_set.find(f.first);
      if (it != k_set.end() && it->second <= f.second) {
        k_set.erase(it);
      }
    }
  }
  T mul = -1;
  if (k_set.empty()) {
    mul = k + 10;
  }
#endif

#else

#endif
//  debug(mul);
  if (mul >= k) {
    printf("Yes\n");
  } else {
    printf("No\n");
  }
}

int main() {
#ifdef LOCAL_COMP
  freopen("a.txt", "r", stdin);
#endif

#if 0
  ios_base::sync_with_stdio(false);
  cin.tie(0);

//  for (int i = 1; i < 1000; ++i) {
//    debug(i, solve(to_string(i)));
//  }

  for (int n; cin >> n; ) {
//    cout << solve(n) << endl;
//    while(n--) {
      solve(n);
//    }
//    if (solve(n)) {
//      cout << "YES" << endl;
//    } else {
//      cout << "NO" << endl;
//    }
  }
  cout.flush();
#else
  int n;
  while (scanf("%d", &n) == 1) {
    solve(n);
  }
#endif

  return 0;
}


#include <bits/stdc++.h>

#ifdef LOCAL_COMP
#define VA_NUM_ARGS(...) VA_NUM_ARGS_IMPL(0,__VA_ARGS__, 5,4,3,2,1)
#define VA_NUM_ARGS_IMPL(_0,_1,_2,_3,_4,_5,N,...) N

#define macro_dispatcher(macro, ...) macro_dispatcher_(macro, VA_NUM_ARGS(__VA_ARGS__))
#define macro_dispatcher_(macro, nargs) macro_dispatcher__(macro, nargs)
#define macro_dispatcher__(macro, nargs) macro ## nargs

#define debug(...) macro_dispatcher(debug, __VA_ARGS__)(__VA_ARGS__)

#define debug1(a)       cout<< #a << " = " << (a) << endl
#define debug2(a,b)     cout<< #a << " = " << (a) << "  " << #b << " = " << (b) << endl
#define debug3(a,b,c)   cout<< #a << " = " << (a) << "  " << #b << " = " << (b) << "  " \
  << #c << " = " << (c) << endl
#define debug4(a,b,c,d) cout<< #a << " = " << (a) << "  " << #b << " = " << (b) << "  " \
  << #c << " = " << (c) << "  " << #d << " = " << (d) << endl
#else
#define debug(...)
#endif

using namespace std;

typedef long long T;

vector<T> calc_primes(int k) {
  vector<bool> sieve(k + 1, true);
  vector<T> primes;
  for (int i = 2; i < sieve.size(); ++i) {
    if (sieve[i]) {
      primes.push_back(i);
      for (int j = i + i; j < sieve.size(); j += i) {
        sieve[j] = false;
      }
    }
  }
  return primes;
}

vector<pair<T, int> > factorize(T n, const vector<T> &primes) {
  vector<pair<T, int> > ret;
  for (int k = 0; k < primes.size(); ++k) {
    T p = primes[k];
    if (p * p > n) {
      break;
    }
    if (n % p == 0) {
      ret.emplace_back(p, 0);
      while (n % p == 0) {
        ret.back().second += 1;
        n /= p;
      }
    }
  }
  if (n != 1) {
    ret.emplace_back(n, 1);
  }
  return ret;
}

T calc_lcm(T a, T b) {
  T g = __gcd(a, b);
  return (a / g) * b;
}

T get_lcm(const vector<T> &a, const T k) {
  T lcm = a[0];
  for (int i = 1; i < a.size(); ++i) {
    lcm = calc_lcm(lcm, a[i]);
    if (lcm > k) {
      break;
    }
  }
  return lcm;
}

void solve(int n) {
  T k;
  {
    int kk; scanf("%d", &kk);
    k = kk;
  }

  vector<T> coefs(n);
  for (int i = 0; i < n; ++i) {
    int cur; scanf("%d", &cur);
    coefs[i] = cur;
  }

#if 0
  const vector<T> primes = calc_primes(k);

  map<T, int> eq;

  for (int i = 0; i < n; ++i) {
    T c = coefs[i];

    auto facts = factorize(c, primes);

    for (const pair<T, int> &f : facts) {
      auto it = eq.find(f.first);
      if (it == eq.end()) {
        eq[f.first] = f.second;
      } else {
        it->second = std::max(it->second, f.second);
      }
    }
  }

  T mul = 1;

  for (const pair<T, int> &e : eq) {
    for (int i = 0; i < 1; ++i) {
      mul *= e.first;
      if (mul > k) {
        break;
      }
    }
  }
#else
  T mul = get_lcm(coefs, k);

  if (mul >= k) {
    printf("Yes\n");
  } else {
    printf("No\n");
  }
#endif
}

int main() {
#ifdef LOCAL_COMP
  freopen("a.txt", "r", stdin);
#endif

#if 0
  ios_base::sync_with_stdio(false);
  cin.tie(0);

//  for (int i = 1; i < 1000; ++i) {
//    debug(i, solve(to_string(i)));
//  }

  for (int n; cin >> n; ) {
//    cout << solve(n) << endl;
//    while(n--) {
      solve(n);
//    }
//    if (solve(n)) {
//      cout << "YES" << endl;
//    } else {
//      cout << "NO" << endl;
//    }
  }
  cout.flush();
#else
  int n;
  while (scanf("%d", &n) == 1) {
    solve(n);
  }
#endif

  return 0;
}


#include <bits/stdc++.h>

#ifdef LOCAL_COMP
#define VA_NUM_ARGS(...) VA_NUM_ARGS_IMPL(0,__VA_ARGS__, 5,4,3,2,1)
#define VA_NUM_ARGS_IMPL(_0,_1,_2,_3,_4,_5,N,...) N

#define macro_dispatcher(macro, ...) macro_dispatcher_(macro, VA_NUM_ARGS(__VA_ARGS__))
#define macro_dispatcher_(macro, nargs) macro_dispatcher__(macro, nargs)
#define macro_dispatcher__(macro, nargs) macro ## nargs

#define debug(...) macro_dispatcher(debug, __VA_ARGS__)(__VA_ARGS__)

#define debug1(a)       cout<< #a << " = " << (a) << endl
#define debug2(a,b)     cout<< #a << " = " << (a) << "  " << #b << " = " << (b) << endl
#define debug3(a,b,c)   cout<< #a << " = " << (a) << "  " << #b << " = " << (b) << "  " \
  << #c << " = " << (c) << endl
#define debug4(a,b,c,d) cout<< #a << " = " << (a) << "  " << #b << " = " << (b) << "  " \
  << #c << " = " << (c) << "  " << #d << " = " << (d) << endl
#else
#define debug(...)
#endif

using namespace std;

typedef long long T;

vector<T> calc_primes(int k) {
  vector<bool> sieve(k + 1, true);
  vector<T> primes;
  for (int i = 2; i < sieve.size(); ++i) {
    if (sieve[i]) {
      primes.push_back(i);
      for (int j = i + i; j < sieve.size(); j += i) {
        sieve[j] = false;
      }
    }
  }
  return primes;
}

vector<pair<T, int> > factorize(T n, const vector<T> &primes) {
  vector<pair<T, int> > ret;
  for (int k = 0; k < primes.size(); ++k) {
    T p = primes[k];
    if (p * p > n) {
      break;
    }
    if (n % p == 0) {
      ret.emplace_back(p, 0);
      while (n % p == 0) {
        ret.back().second += 1;
        n /= p;
      }
    }
  }
  if (n != 1) {
    ret.emplace_back(n, 1);
  }
  return ret;
}

T calc_lcm(T a, T b) {
  T g = __gcd(a, b);
  return (a / g) * b;
}

T get_lcm(const vector<T> &a, const T k) {
  T lcm = a[0];
  for (int i = 1; i < a.size(); ++i) {
    lcm = calc_lcm(lcm, a[i]);
    if (lcm > k) {
      break;
    }
  }
  return lcm;
}

void solve(int n) {
  T k;
  {
    int kk; scanf("%d", &kk);
    k = kk;
  }

  vector<T> coefs(n);
  for (int i = 0; i < n; ++i) {
    int cur; scanf("%d", &cur);
    coefs[i] = cur;
  }

#if 1
  const vector<T> primes = calc_primes(k);

  map<T, int> eq;

  for (int i = 0; i < n; ++i) {
    T c = coefs[i];

    auto facts = factorize(c, primes);

    for (const pair<T, int> &f : facts) {
      auto it = eq.find(f.first);
      if (it == eq.end()) {
        eq[f.first] = f.second;
      } else {
        it->second = std::max(it->second, f.second);
      }
    }
  }

  T mul = 1;

  for (const pair<T, int> &e : eq) {
    for (int i = 0; i < e.second; ++i) {
      mul *= e.first;
      if (mul > k) {
        break;
      }
    }
  }
#else
  T mul = get_lcm(coefs, k);
#endif
  if (mul >= k) {
    printf("Yes\n");
  } else {
    printf("No\n");
  }
}

int main() {
#ifdef LOCAL_COMP
  freopen("a.txt", "r", stdin);
#endif

#if 0
  ios_base::sync_with_stdio(false);
  cin.tie(0);

//  for (int i = 1; i < 1000; ++i) {
//    debug(i, solve(to_string(i)));
//  }

  for (int n; cin >> n; ) {
//    cout << solve(n) << endl;
//    while(n--) {
      solve(n);
//    }
//    if (solve(n)) {
//      cout << "YES" << endl;
//    } else {
//      cout << "NO" << endl;
//    }
  }
  cout.flush();
#else
  int n;
  while (scanf("%d", &n) == 1) {
    solve(n);
  }
#endif

  return 0;
}


#include <bits/stdc++.h>

#ifdef LOCAL_COMP
#define VA_NUM_ARGS(...) VA_NUM_ARGS_IMPL(0,__VA_ARGS__, 5,4,3,2,1)
#define VA_NUM_ARGS_IMPL(_0,_1,_2,_3,_4,_5,N,...) N

#define macro_dispatcher(macro, ...) macro_dispatcher_(macro, VA_NUM_ARGS(__VA_ARGS__))
#define macro_dispatcher_(macro, nargs) macro_dispatcher__(macro, nargs)
#define macro_dispatcher__(macro, nargs) macro ## nargs

#define debug(...) macro_dispatcher(debug, __VA_ARGS__)(__VA_ARGS__)

#define debug1(a)       cout<< #a << " = " << (a) << endl
#define debug2(a,b)     cout<< #a << " = " << (a) << "  " << #b << " = " << (b) << endl
#define debug3(a,b,c)   cout<< #a << " = " << (a) << "  " << #b << " = " << (b) << "  " \
  << #c << " = " << (c) << endl
#define debug4(a,b,c,d) cout<< #a << " = " << (a) << "  " << #b << " = " << (b) << "  " \
  << #c << " = " << (c) << "  " << #d << " = " << (d) << endl
#else
#define debug(...)
#endif

using namespace std;

typedef long long T;

vector<T> calc_primes(int k) {
  vector<bool> sieve(k + 1, true);
  vector<T> primes;
  for (int i = 2; i < sieve.size(); ++i) {
    if (sieve[i]) {
      primes.push_back(i);
      for (int j = i + i; j < sieve.size(); j += i) {
        sieve[j] = false;
      }
    }
  }
  return primes;
}

vector<pair<T, int> > factorize(T n, const vector<T> &primes) {
  vector<pair<T, int> > ret;
  for (int k = 0; k < primes.size(); ++k) {
    T p = primes[k];
    if (p * p > n) {
      break;
    }
    if (n % p == 0) {
      ret.emplace_back(p, 0);
      while (n % p == 0) {
        ret.back().second += 1;
        n /= p;
      }
    }
  }
  if (n != 1) {
    ret.emplace_back(n, 1);
  }
  return ret;
}

void solve(int n) {
  T k;
  {
    int kk; scanf("%d", &kk);
    k = kk;
  }

  vector<T> coefs(n);
  for (int i = 0; i < n; ++i) {
    int cur; scanf("%d", &cur);
    coefs[i] = cur;
  }

  const vector<T> primes = calc_primes(k);

  map<T, int> eq;

  for (int i = 0; i < n; ++i) {
    T c = coefs[i];

    auto facts = factorize(c, primes);

    for (const pair<T, int> &f : facts) {
      auto it = eq.find(f.first);
      if (it == eq.end()) {
        eq[f.first] = f.second;
      } else {
        it->second = std::max(it->second, f.second);
      }
    }
  }

  T mul = 1;

  for (const pair<T, int> &e : eq) {
    for (int i = 0; i < e.second; ++i) {
      mul *= e.first;
      if (mul > k) {
        break;
      }
    }
  }

  if (mul > k) {
    printf("Yes\n");
  } else {
    printf("No\n");
  }
}

int main() {
#ifdef LOCAL_COMP
  freopen("a.txt", "r", stdin);
#endif

#if 0
  ios_base::sync_with_stdio(false);
  cin.tie(0);

//  for (int i = 1; i < 1000; ++i) {
//    debug(i, solve(to_string(i)));
//  }

  for (int n; cin >> n; ) {
//    cout << solve(n) << endl;
//    while(n--) {
      solve(n);
//    }
//    if (solve(n)) {
//      cout << "YES" << endl;
//    } else {
//      cout << "NO" << endl;
//    }
  }
  cout.flush();
#else
  int n;
  while (scanf("%d", &n) == 1) {
    solve(n);
  }
#endif

  return 0;
}


#include <bits/stdc++.h>

#ifdef LOCAL_COMP
#define VA_NUM_ARGS(...) VA_NUM_ARGS_IMPL(0,__VA_ARGS__, 5,4,3,2,1)
#define VA_NUM_ARGS_IMPL(_0,_1,_2,_3,_4,_5,N,...) N

#define macro_dispatcher(macro, ...) macro_dispatcher_(macro, VA_NUM_ARGS(__VA_ARGS__))
#define macro_dispatcher_(macro, nargs) macro_dispatcher__(macro, nargs)
#define macro_dispatcher__(macro, nargs) macro ## nargs

#define debug(...) macro_dispatcher(debug, __VA_ARGS__)(__VA_ARGS__)

#define debug1(a)       cout<< #a << " = " << (a) << endl
#define debug2(a,b)     cout<< #a << " = " << (a) << "  " << #b << " = " << (b) << endl
#define debug3(a,b,c)   cout<< #a << " = " << (a) << "  " << #b << " = " << (b) << "  " \
  << #c << " = " << (c) << endl
#define debug4(a,b,c,d) cout<< #a << " = " << (a) << "  " << #b << " = " << (b) << "  " \
  << #c << " = " << (c) << "  " << #d << " = " << (d) << endl
#else
#define debug(...)
#endif

using namespace std;

typedef long long T;

vector<T> calc_primes(int k) {
  vector<T> lp(k + 1, 0);
  vector<T> primes;
  for (int i = 2; i < k; ++i) {
    if (lp[i] == 0) {
      primes.push_back(i);
      lp[i] = i;
    }
    for (T p : primes) {
      if (i * p > k || lp[i] < p) {
        break;
      }
      lp[i * p] = p;
    }
  }
  return lp;
}

vector<pair<T, int> > factorize(T n, const vector<T> &lp) {
  vector<pair<T, int> > ret;
  while (n != 0) {
    T p = lp[n];
    if (p == 0) {
      ret.emplace_back(n, 1);
      break;
    }
    ret.emplace_back(p, 0);
    while (lp[n] == p) {
      ret.back().second += 1;
      n /= p;
    }
  }
  return ret;
}

T gcd(T a, T b) {
  while (b > 0) {
    a %= b;
    swap(a, b);
  }
  return a;
}

T calc_lcm(T a, T b) {
  T g = gcd(a, b);
  return (a / g) * b;
}

T get_lcm(const vector<T> &a, const T k) {
  T lcm = a[0];
  for (int i = 1; i < a.size(); ++i) {
    lcm = calc_lcm(lcm, a[i]);
    if (lcm > k) {
      break;
    }
  }
  return lcm;
}

void solve(int n) {
  T k;
  {
    int kk; scanf("%d", &kk);
    k = kk;
  }

  vector<T> coefs(n);
  for (int i = 0; i < n; ++i) {
    int cur; scanf("%d", &cur);
    coefs[i] = cur;
  }

#if 1
  const vector<T> lp = calc_primes(k);

#if 0
  map<T, int> eq;
  for (int i = 0; i < n; ++i) {
    T c = coefs[i];

    auto facts = factorize(c, primes);

    for (const pair<T, int> &f : facts) {
      auto it = eq.find(f.first);
      if (it == eq.end()) {
        eq[f.first] = f.second;
      } else {
        it->second = std::max(it->second, f.second);
      }
    }
  }

  T mul = 1;

  for (const pair<T, int> &e : eq) {
    for (int i = 0; i < e.second; ++i) {
      mul *= e.first;
      if (mul > k) {
        break;
      }
    }
    if (mul > k) {
      break;
    }
  }
#else
  auto k_facts = factorize(k, lp);
  map<T, int> k_set(k_facts.begin(), k_facts.end());

  for (int i = 0; i < n; ++i) {
    T c = coefs[i];

    auto facts = factorize(c, lp);
    for (const pair<T, int> &f : facts) {
      auto it = k_set.find(f.first);
      if (it != k_set.end() && it->second <= f.second) {
        k_set.erase(it);
      }
    }
  }
  T mul = -1;
  if (k_set.empty()) {
    mul = k + 10;
  }
#endif

#else

#endif
//  debug(mul);
  if (mul >= k) {
    printf("Yes\n");
  } else {
    printf("No\n");
  }
}

int main() {
#ifdef LOCAL_COMP
  freopen("a.txt", "r", stdin);
#endif

#if 0
  ios_base::sync_with_stdio(false);
  cin.tie(0);

//  for (int i = 1; i < 1000; ++i) {
//    debug(i, solve(to_string(i)));
//  }

  for (int n; cin >> n; ) {
//    cout << solve(n) << endl;
//    while(n--) {
      solve(n);
//    }
//    if (solve(n)) {
//      cout << "YES" << endl;
//    } else {
//      cout << "NO" << endl;
//    }
  }
  cout.flush();
#else
  int n;
  while (scanf("%d", &n) == 1) {
    solve(n);
  }
#endif

  return 0;
}


#include <cstdio>
#include <iostream>
#define FOR(i,a,b) for(int i=a; i<b; i++)
using namespace std;
long long n,k,c[1000000];
long long lcm (long long a, long long b)
{
	long long ret = a*b;
	return ret/__gcd(a,b);
}
int main()
{
	cin>>n>>k;
	FOR(i,0,n)
		cin>>c[i];
	long long L = __gcd(c[0],k);
	FOR(i,1,n)
	{
		L = lcm(L,c[i]);
		L = __gcd(L,k);
	}
	cout<<(L==k ? "YES":"NO")<<endl;
}


#include <cstdio>
#include <iostream>
#define FOR(i,a,b) for(int i=a; i<b; i++)
#define dbug(x) #x<<": "<<x<<' '
using namespace std;
typedef long long ll;
const int MAX = 1e6;
ll n,k,c[MAX];
ll lcm (ll a, ll b)
{
	ll ret = a*b;
	return ret/__gcd(a,b);
}
int main()
{
	cin>>n>>k;
	FOR(i,0,n)
		cin>>c[i];
	ll L = __gcd(c[0],k);
	FOR(i,1,n)
	{
		L = lcm(L,c[i]);
		L = __gcd(L,k);
	}
	cout<<(L==k ? "YES":"NO")<<endl;
}


#include <cstdio>
#include <iostream>
#define FOR(i,a,b) for(int i=a; i<b; i++)
#define dbug(x) #x<<": "<<x<<' '
using namespace std;
typedef long ll;
const int MAX = 1e6;
ll n,k,c[MAX];
ll lcm (ll a, ll b)
{
	ll ret = a*b;
	return ret/__gcd(a,b);
}
int main()
{
	cin>>n>>k;
	FOR(i,0,n)
	{
		scanf("%ld",c+i);
	}
	ll L = __gcd(c[0],k);
	FOR(i,1,n)
	{
		L = lcm(L,c[i]);
		L = __gcd(L,k);
	}
	cout<<(L==k ? "YES":"NO")<<endl;
}


#include <cstdio>
#include <iostream>
#define FOR(i,a,b) for(int i=a; i<b; i++)
#define dbug(x) #x<<": "<<x<<' '
using namespace std;
typedef long long ll;
const int MAX = 1e6;
ll n,k,c[MAX];
ll lcm (ll a, ll b)
{
	ll ret = a*b;
	return ret/__gcd(a,b);
}
int main()
{
	cin>>n>>k;
	FOR(i,0,n)
		scanf("%d",c+i);
	ll L = __gcd(c[0],k);
	FOR(i,1,n)
	{
		L = lcm(L,c[i]);
		L = __gcd(L,k);
	}
	cout<<(L==k ? "YES":"NO")<<endl;
}


#include <cstdio>
#include <iostream>
#define FOR(i,a,b) for(int i=a; i<b; i++)
#define dbug(x) #x<<": "<<x<<' '
using namespace std;
typedef long long ll;
const int MAX = 1e6;
ll n,k,c[MAX];
ll lcm (ll a, ll b)
{
	ll ret = a*b;
	return ret/__gcd(a,b);
}
int main()
{
	cin>>n>>k;
	FOR(i,0,n)
	{
		int tmp;
		scanf("%d",&tmp);
		c[i] = tmp;
	}
	ll L = __gcd(c[0],k);
	FOR(i,1,n)
	{
		L = lcm(L,c[i]);
		L = __gcd(L,k);
	}
	cout<<(L==k ? "YES":"NO")<<endl;
}


#include <cstdio>
#include <iostream>
#define FOR(i,a,b) for(int i=a; i<b; i++)
#define dbug(x) #x<<": "<<x<<' '
using namespace std;
typedef long long ll;
const int MAX = 1e6;
ll n,k,c[MAX];
ll lcm (ll a, ll b)
{
	ll ret = a*b;
	return ret/__gcd(a,b);
}
int main()
{
	cin>>n>>k;
	FOR(i,0,n)
		scanf("%Ld",c+i);
	ll L = __gcd(c[0],k);
	FOR(i,1,n)
	{
		L = lcm(L,c[i]);
		L = __gcd(L,k);
	}
	cout<<(L==k ? "YES":"NO")<<endl;
}


#include <bits/stdc++.h>
#define FOR(i,a,b) for(int i=a; i<b; i++)
using namespace std;
long long n,k,c[1000000];
long long lcm (long long a, long long b)
{
	long long ret = a*b;
	return ret/__gcd(a,b);
}
int main()
{
	cin>>n>>k;
	FOR(i,0,n)
		cin>>c[i];
	long long L = __gcd(c[0],k);
	FOR(i,1,n)
	{
		L = lcm(L,c[i]);
		L = __gcd(L,k);
	}
	cout<<(L==k ? "YES":"NO")<<endl;
}


#include <cstdio>
#include <iostream>
#define FOR(i,a,b) for(int i=a; i<b; i++)
#define dbug(x) #x<<": "<<x<<' '
using namespace std;
typedef long long ll;
const int MAX = 1e6;
ll n,k,c[MAX];
ll lcm (ll a, ll b)
{
	ll ret = a*b;
	return ret/__gcd(a,b);
}
int main()
{
	cin>>n>>k;
	FOR(i,0,n)
		scanf("%I64d",c+i);
	ll L = __gcd(c[0],k);
	FOR(i,1,n)
	{
		L = lcm(L,c[i]);
		L = __gcd(L,k);
	}
	cout<<(L==k ? "YES":"NO")<<endl;
}


#include <bits/stdc++.h>
#define FOR(i,a,b) for(int i=a; i<b; i++)
using namespace std;
long long n,k,c[1000000];
long long lcm (long long a, long long b)
{
	long long ret = a*b;
	return ret/__gcd(a,b);
}
int main()
{
	cin>>n>>k;
	FOR(i,0,n)
		scanf("%d",c+i);
	long long L = __gcd(c[0],k);
	FOR(i,1,n)
	{
		L = lcm(L,c[i]);
		L = __gcd(L,k);
	}
	cout<<(L==k ? "YES":"NO")<<endl;
}


#include <bits/stdc++.h>
#define int int64_t

using namespace std;

vector<int> c;
int n, k;
vector<int> v, primes;

int gcd (int a, int b)
{
	return b ? gcd (b, a % b) : a;
}

int lcm(int a, int b)
{
    return (a / gcd(a, b) * b);
}

void init()
{
    ios_base::sync_with_stdio(false);
    cin >> n >> k;
    c.resize(n);
    for (int i = 0; i < n; ++i)
    {
        cin >> c[i];
    }
}

void solve()
{
    int x = c[0];
    for (int i = 0; i < c.size(); ++i)
    {
        x = lcm(x, gcd(k, c[i]));
    }
    if (x == 1)
    {
        cout << "Yes" << endl;
    }
    else
    {
        cout << "No" << endl;
    }
}

int32_t main()
{
    init();
    solve();

    return 0;
}


#include <bits/stdc++.h>
#define int int64_t

using namespace std;

vector<int> c;
int n, k;
vector<int> v, primes;

int gcd (int a, int b)
{
	return b ? gcd (b, a % b) : a;
}

void init()
{
    ios_base::sync_with_stdio(false);
    cin >> n >> k;
    c.resize(n);
    for (int i = 0; i < n; ++i)
    {
        cin >> c[i];
    }
}

void solve()
{
    if (k == 1)
    {
        cout << "Yes" << endl;
        return;
    }
    for (int i = 0; i < c.size(); ++i)
    {
        if (c[i] == k)
        {
            cout << "Yes" << endl;
            return;
        }
    }
    int temp_k = k;
    bool b = false;
    for (int i = 2; i*i <= k; ++i)
    {
        if (k % i*i == 0)
        {
            cout << "No" << endl;
            return;
        }
    }
    temp_k = k;
    for (int i = 0; i < c.size(); ++i)
    {
        if (temp_k % c[i] == 0)
        {
            v.push_back(c[i]);
            temp_k /= c[i];
        }
    }
    if (temp_k == 1)
    {
        cout << "Yes" << endl;
    }
    else
    {
        cout << "No" << endl;
    }
}

int32_t main()
{
    init();
    solve();

    return 0;
}


#include <bits/stdc++.h>
#define int int64_t

using namespace std;

vector<int> c;
int n, k;
vector<int> v, primes;

int gcd (int a, int b)
{
	return b ? gcd (b, a % b) : a;
}

void init()
{
    ios_base::sync_with_stdio(false);
    cin >> n >> k;
    c.resize(n);
    for (int i = 0; i < n; ++i)
    {
        cin >> c[i];
    }
}

void solve()
{
    for (int i = 0; i < c.size(); ++i)
    {
        k /= gcd(k, c[i]);
    }
    if (k == 1)
    {
        cout << "Yes" << endl;
    }
    else
    {
        cout << "No" << endl;
    }
}

int32_t main()
{
    init();
    solve();

    return 0;
}


#include <bits/stdc++.h>
#define int int64_t

using namespace std;

vector<int> c;
int n, k;
vector<int> v, primes;

int gcd (int a, int b)
{
	return b ? gcd (b, a % b) : a;
}

void init()
{
    ios_base::sync_with_stdio(false);
    cin >> n >> k;
    c.resize(n);
    for (int i = 0; i < n; ++i)
    {
        cin >> c[i];
    }
}

void solve()
{
    for (int i = 0; i < c.size(); ++i)
    {
        if (c[i] == k)
        {
            cout << "Yes" << endl;
            return;
        }
    }
    int temp_k = k;
    bool b = false;
    for (int i = 2; i*i <= k; ++i)
    {
        if (k % i*i == 0)
        {
            cout << "No" << endl;
            return;
        }
    }
    temp_k = k;
    for (int i = 0; i < c.size(); ++i)
    {
        if (temp_k % c[i] == 0)
        {
            v.push_back(c[i]);
            temp_k /= c[i];
        }
    }
    if (temp_k == 1)
    {
        cout << "Yes" << endl;
    }
    else
    {
        cout << "No" << endl;
    }
}

int32_t main()
{
    init();
    solve();

    return 0;
}


#include <bits/stdc++.h>
#define int int64_t

using namespace std;

vector<int> c;
int n, k;
vector<int> v, primes;

int gcd (int a, int b)
{
	return b ? gcd (b, a % b) : a;
}

int lcm(int a, int b)
{
    return (a / gcd(a, b) * b);
}

void init()
{
    ios_base::sync_with_stdio(false);
    cin >> n >> k;
    c.resize(n);
    for (int i = 0; i < n; ++i)
    {
        cin >> c[i];
    }
}

void solve()
{
    int x = c[0];
    for (int i = 0; i < c.size(); ++i)
    {
        x = lcm(x, gcd(k, c[i]));
    }
    if (x % k == 0)
    {
        cout << "Yes" << endl;
    }
    else
    {
        cout << "No" << endl;
    }
}

int32_t main()
{
    init();
    solve();

    return 0;
}


#include <bits/stdc++.h>
#define int int64_t

using namespace std;

vector<int> c;
int n, k;

int gcd (int a, int b)
{
	return b ? gcd (b, a % b) : a;
}

void init()
{
    ios_base::sync_with_stdio(false);
    cin >> n >> k;
    c.resize(n);
    for (int i = 0; i < n; ++i)
    {
        cin >> c[i];
    }
}

void solve()
{
    int x = c[0];
    bool f = false;
    for (int i = 0; i < c.size(); ++i)
    {
        x = gcd(x, c[i]);
        if (c[i] == k)
            f = true;
    }
    if (f)
    {
        cout << "Yes" << endl;
    }
    else
    {
        for (int i = 0; i < c.size(); ++i)
        {
            if (k % c[i] != 0)
            {
                cout << "No" << endl;
                return;
            }
            else
            {
                k /= c[i];
            }
        }
        if (x == 1)
        {
            cout << "Yes" << endl;
        }
        else
        {
            cout  << "No" << endl;
        }
    }
}

int32_t main()
{
    init();
    solve();

    return 0;
}


#include <bits/stdc++.h>
#define int int64_t

using namespace std;

vector<int> c;
int n, k;
vector<int> v, primes;

int gcd (int a, int b)
{
	return b ? gcd (b, a % b) : a;
}

void init()
{
    ios_base::sync_with_stdio(false);
    cin >> n >> k;
    c.resize(n);
    for (int i = 0; i < n; ++i)
    {
        cin >> c[i];
    }
}

void solve()
{
    int temp_k = k;
    bool b = false;
    for (int i = 2; i*i <= k; ++i)
    {
        if (k % i*i == 0)
            b = true;
    }
    if (b)
    {
        cout << "No" << endl;
        return;
    }
    int x = -1;
    temp_k = k;
    for (int i = 0; i < c.size(); ++i)
    {
        if (temp_k % c[i] == 0)
        {
            v.push_back(c[i]);
            temp_k /= c[i];
        }
    }
    if (temp_k == 1)
    {
        cout << "Yes" << endl;
    }
    else
    {
        cout << "No" << endl;
    }
}

int32_t main()
{
    init();
    solve();

    return 0;
}


#include <bits/stdc++.h>
#define int int64_t

using namespace std;

vector<int> c;
int n, k;
vector<int> v, primes;

int gcd (int a, int b)
{
	return b ? gcd (b, a % b) : a;
}

void init()
{
    ios_base::sync_with_stdio(false);
    cin >> n >> k;
    c.resize(n);
    for (int i = 0; i < n; ++i)
    {
        cin >> c[i];
    }
}

void solve()
{
    int temp_k = k;
    bool b = false;
    for (int i = 2; i*i <= k; ++i)
    {
        if (k % i*i == 0)
        {
            cout << "No" << endl;
            return;
        }
    }
    temp_k = k;
    for (int i = 0; i < c.size(); ++i)
    {
        if (temp_k % c[i] == 0)
        {
            v.push_back(c[i]);
            temp_k /= c[i];
        }
    }
    if (temp_k == 1)
    {
        cout << "Yes" << endl;
    }
    else
    {
        cout << "No" << endl;
    }
}

int32_t main()
{
    init();
    solve();

    return 0;
}


#include <iostream>
#include <bits/stdc++.h>

using namespace std;

int k;

unsigned long long lcm(unsigned long long a, unsigned long long b) {
	unsigned long long l = 1;
	if (a%k==0 || b%k==0) {
		return k;
	}
	for (int i = 2;a>1 || b>1; ++i)
	{
		while(a%i==0 || b%i==0) {
			l*=i;
			if(a%i==0) {
				a/=i;
			}
			if(b%i==0) {
				b/=i;
			}
		}
	}
	return l;
}

unsigned long long lcm(vector<int> v) {
	if (v.size() < 1 ) {
		return 1;
	}
	else if (v.size() ==1 ) {
		return v[0];
	}
	else {
		return lcm(lcm(vector<int>(v.begin(),v.begin()+v.size()/2)), lcm(vector<int>(v.begin()+v.size()/2, v.end())));
	}
}

int main(int argc, char const *argv[])
{
	// unsigned long long l = 48;
	// cout<<l%5<<endl;
	int n;
	// while(1) {
		// cin>>n;
		cin>>n>>k;
		std::vector<int> c(n);

		for (int i = 0; i < n; ++i)
		{
			cin>>c[i];
		}

		// cout<<"lcm: "<<lcm(c)<<endl;

		if (lcm(c) % k ==0) {
			cout<<"Yes"<<endl;
		}
		else {
			cout<<"No"<<endl;
		}
	// }

	return 0;
}


#include <iostream>
#include <bits/stdc++.h>

using namespace std;

map<int, int> factorize(int k) {
	int f = 2;
	int p = 0;
	map<int, int> primeF;
	while (k>1) {
		p=0;
		while (k%f == 0) {
			k/=f;
			p++;
		}
		if (p>0) {
			primeF[f] = p;
		}
		f++;
	}
	return primeF;
}

// bool ExistsGreater

// map<int, int> getLCM(vector<int> k) {
// 	int f = 2;
// 	int p = 0;
// 	map<int, int> primeF;
// 	while (k>1) {
// 		p=0;
// 		while (k%f == 0) {
// 			k/=f;
// 			p++;
// 		}
// 		if (p>0) {
// 			primeF[f] = p;
// 		}
// 		f++;
// 	}
// 	return primeF;
// }

map<int, int> Compare(vector< map<int, int> > pF) {
	map<int, int> expMap;
	for (auto i = pF.begin(); i != pF.end(); ++i)
	{
		for (auto it = i->begin(); it != i->end(); ++it)
		{
			if (expMap.find(it->first) == expMap.end()) {
				expMap[it->first] = it->second;
			}
			else if (expMap[it->first] < it->second) {
				expMap[it->first] = it->second;
			}
		}
	}
	return expMap;
}

int main(int argc, char const *argv[])
{
	int n,k;
	cin>>n>>k;
	std::vector<int> c(n);
	std::vector< map<int, int> > c_primeF(n);

	for (int i = 0; i < n; ++i)
	{
		scanf("%d",&c[i]);
		c_primeF[i] = factorize(c[i]);
	}

	map<int, int> k_primeF = factorize(k);
	map<int, int> c_LCM = Compare(c_primeF);

	bool flag = true;
	for (auto i = k_primeF.begin(); i != k_primeF.end(); ++i)
	{
		if (c_LCM.find(i->first) == c_LCM.end()) {
			flag = false;
			break;
		}
		else if (c_LCM[i->first] < i->second) {
			flag = false;
			break;
		}
	}

	if (flag) {
		cout<<"Yes"<<endl;
	}
	else {
		cout<<"No"<<endl;
	}

	return 0;
}


#include <iostream>
#include <bits/stdc++.h>

using namespace std;

map<int, int> factorize(int k) {
	int f = 2;
	int p = 0;
	map<int, int> primeF;
	if (k>1) {
		p=0;
		while (k%f == 0) {
			k/=f;
			p++;
		}
		if (p>0) {
			primeF[f] = p;
		}
		f++;
	}
	while (k>1) {
		p=0;
		while (k%f == 0) {
			k/=f;
			p++;
		}
		if (p>0) {
			primeF[f] = p;
		}
		f++;
		f++;
	}
	return primeF;
}
map<int, int> factorizeLimited(int k, vector<int> fact) {
	auto f = fact.begin();
	int p = 0;
	map<int, int> primeF;
	while (k>1 && f!=fact.end()) {
		p=0;
		while (k%(*f) == 0) {
			k/=(*f);
			p++;
		}
		if (p>0) {
			primeF[(*f)] = p;
		}
		f++;
	}
	return primeF;
}

// bool ExistsGreater

// map<int, int> getLCM(vector<int> k) {
// 	int f = 2;
// 	int p = 0;
// 	map<int, int> primeF;
// 	while (k>1) {
// 		p=0;
// 		while (k%f == 0) {
// 			k/=f;
// 			p++;
// 		}
// 		if (p>0) {
// 			primeF[f] = p;
// 		}
// 		f++;
// 	}
// 	return primeF;
// }

map<int, int> Compare(vector< map<int, int> > pF) {
	map<int, int> expMap;
	for (auto i = pF.begin(); i != pF.end(); ++i)
	{
		for (auto it = i->begin(); it != i->end(); ++it)
		{
			if (expMap.find(it->first) == expMap.end()) {
				expMap[it->first] = it->second;
			}
			else if (expMap[it->first] < it->second) {
				expMap[it->first] = it->second;
			}
		}
	}
	return expMap;
}

int main(int argc, char const *argv[])
{
	int n,k;
	cin>>n>>k;
	std::vector<int> c(n);
	std::vector< map<int, int> > c_primeF(n);

	for (int i = 0; i < n; ++i)
	{
		scanf("%d",&c[i]);
	}

	map<int, int> k_primeF = factorize(k);
	vector<int> kPrimes;
	for (auto i = k_primeF.begin(); i != k_primeF.end(); ++i)
	{
		kPrimes.push_back(i->first);
	}

	for (int i = 0; i < n; ++i)
	{
		c_primeF[i] = factorizeLimited(c[i],kPrimes);
	}

	map<int, int> c_LCM = Compare(c_primeF);

	bool flag = true;
	for (auto i = k_primeF.begin(); i != k_primeF.end(); ++i)
	{
		if (c_LCM.find(i->first) == c_LCM.end()) {
			flag = false;
			break;
		}
		else if (c_LCM[i->first] < i->second) {
			flag = false;
			break;
		}
	}

	if (flag) {
		cout<<"Yes"<<endl;
	}
	else {
		cout<<"No"<<endl;
	}

	return 0;
}


#include <iostream>
#include <bits/stdc++.h>

using namespace std;

int lcm(int a, int b) {
	int l = 1;
	for (int i = 2;a>1 || b>1; ++i)
	{
		while(a%i==0 || b%i==0) {
			l*=i;
			if(a%i==0) {
				a/=i;
			}
			if(b%i==0) {
				b/=i;
			}
		}
	}
	return l;
}

int lcm(vector<int> v) {
	if (v.size() < 1 ) {
		return 1;
	}
	else if (v.size() ==1 ) {
		return v[0];
	}
	else {
		return lcm(lcm(vector<int>(v.begin(),v.begin()+v.size()/2)), lcm(vector<int>(v.begin()+v.size()/2, v.end())));
	}
}

int main(int argc, char const *argv[])
{
	int n,k;
	// while(1) {
		// cin>>n;
		cin>>n>>k;
		std::vector<int> c(n);

		for (int i = 0; i < n; ++i)
		{
			cin>>c[i];
		}

		// cout<<"lcm: "<<lcm(c)<<endl;

		if (lcm(c) % k ==0) {
			cout<<"Yes"<<endl;
		}
		else {
			cout<<"No"<<endl;
		}
	// }

	return 0;
}


#include <iostream>
#include <bits/stdc++.h>

using namespace std;

int k;

unsigned long long lcm(unsigned long long a, unsigned long long b) {
	unsigned long long l = 1;
	if (a%k==0 || b%k==0) {
		return k;
	}
	for (int i = 2;a>1 || b>1; ++i)
	{
		while(a%i==0 || b%i==0) {
			l*=i;
			if(a%i==0) {
				a/=i;
			}
			if(b%i==0) {
				b/=i;
			}
		}
	}
	return l;
}

unsigned long long lcm(vector<int> v) {
	if (v.size() < 1 ) {
		return 1;
	}
	else if (v.size() ==1 ) {
		return v[0];
	}
	else {
		unsigned long long l1 = lcm(vector<int>(v.begin(),v.begin()+v.size()/2));
		if(l1%k==0)
			return k;
		unsigned long long l2 = lcm(vector<int>(v.begin()+v.size()/2, v.end()));
		if(l2%k==0)
			return k;
		return lcm(l1, l2);
	}
}

int main(int argc, char const *argv[])
{
	// unsigned long long l = 48;
	// cout<<l%5<<endl;
	int n;
	// while(1) {
		// cin>>n;
		cin>>n>>k;
		std::vector<int> c(n);

		for (int i = 0; i < n; ++i)
		{
			cin>>c[i];
		}

		// cout<<"lcm: "<<lcm(c)<<endl;

		if (lcm(c) % k ==0) {
			cout<<"Yes"<<endl;
		}
		else {
			cout<<"No"<<endl;
		}
	// }

	return 0;
}


#include <iostream>
#include <bits/stdc++.h>

using namespace std;

map<int, int> factorize(int k) {
	int f = 2;
	int p = 0;
	map<int, int> primeF;
	while (k>1) {
		p=0;
		while (k%f == 0) {
			k/=f;
			p++;
		}
		if (p>0) {
			primeF[f] = p;
		}
		f++;
	}
	return primeF;
}

map<int, int> lcm(vector< map<int, int> > pF) {
	map<int, int> expMap;
	for (auto i = pF.begin(); i != pF.end(); ++i)
	{
		for (auto it = i->begin(); it != i->end(); ++it)
		{
			if (expMap.find(it->first) == expMap.end()) {
				expMap[it->first] = it->second;
			}
			else if (expMap[it->first] < it->second) {
				expMap[it->first] = it->second;
			}
		}
	}
	return expMap;
}

int main(int argc, char const *argv[])
{
	int n,k;
	cin>>n>>k;
	std::vector<int> c(n);
	std::vector< map<int, int> > c_primeF(n);

	for (int i = 0; i < n; ++i)
	{
		cin>>c[i];
		c_primeF[i] = factorize(c[i]);
	}

	map<int, int> k_primeF = factorize(k);
	map<int, int> c_LCM = lcm(c_primeF);

	bool flag = true;
	for (auto i = k_primeF.begin(); i != k_primeF.end(); ++i)
	{
		if (c_LCM.find(i->first) == c_LCM.end()) {
			flag = false;
			break;
		}
		else if (c_LCM[i->first] < i->second) {
			flag = false;
			break;
		}
	}

	if (flag) {
		cout<<"Yes"<<endl;
	}
	else {
		cout<<"No"<<endl;
	}

	return 0;
}


#include <iostream>
#include <bits/stdc++.h>

using namespace std;

unsigned long long lcm(unsigned long long a, unsigned long long b) {
	int l = 1;
	for (int i = 2;a>1 || b>1; ++i)
	{
		while((a/i)*i == a || (b/i)*i == b) {
			l*=i;
			if((a/i)*i == a) {
				a/=i;
			}
			if((b/i)*i == b) {
				b/=i;
			}
		}
	}
	return l;
}

unsigned long long lcm(vector<int> v) {
	if (v.size() < 1 ) {
		return 1;
	}
	else if (v.size() ==1 ) {
		return v[0];
	}
	else {
		return lcm(lcm(vector<int>(v.begin(),v.begin()+v.size()/2)), lcm(vector<int>(v.begin()+v.size()/2, v.end())));
	}
}

int main(int argc, char const *argv[])
{
	int n,k;
	// while(1) {
		// cin>>n;
		cin>>n>>k;
		std::vector<int> c(n);

		for (int i = 0; i < n; ++i)
		{
			cin>>c[i];
		}

		// cout<<"lcm: "<<lcm(c)<<endl;
		unsigned long long l = lcm(c);
		if ( (l/k)*k == l) {
			cout<<"Yes"<<endl;
		}
		else {
			cout<<"No"<<endl;
		}
	// }

	return 0;
}


#include <iostream>
#include <bits/stdc++.h>

using namespace std;

map<int, int> factorize(int k) {
	int f = 2;
	int p = 0;
	map<int, int> primeF;
	while (k>1) {
		p=0;
		while (k%f == 0) {
			k/=f;
			p++;
		}
		if (p>0) {
			primeF[f] = p;
		}
		f++;
	}
	return primeF;
}

// bool ExistsGreater

// map<int, int> getLCM(vector<int> k) {
// 	int f = 2;
// 	int p = 0;
// 	map<int, int> primeF;
// 	while (k>1) {
// 		p=0;
// 		while (k%f == 0) {
// 			k/=f;
// 			p++;
// 		}
// 		if (p>0) {
// 			primeF[f] = p;
// 		}
// 		f++;
// 	}
// 	return primeF;
// }

map<int, int> Compare(vector< map<int, int> > pF) {
	map<int, int> expMap;
	for (auto i = pF.begin(); i != pF.end(); ++i)
	{
		for (auto it = i->begin(); it != i->end(); ++it)
		{
			if (expMap.find(it->first) == expMap.end()) {
				expMap[it->first] = it->second;
			}
			else if (expMap[it->first] < it->second) {
				expMap[it->first] = it->second;
			}
		}
	}
	return expMap;
}

int main(int argc, char const *argv[])
{
	int n,k;
	cin>>n>>k;
	std::vector<int> c(n);
	std::vector< map<int, int> > c_primeF(n);

	for (int i = 0; i < n; ++i)
	{
		scanf("%d",&c[i]);
		c_primeF[i] = factorize(c[i]);
	}

	printf("done\n");
	return 0;

	map<int, int> k_primeF = factorize(k);
	map<int, int> c_LCM = Compare(c_primeF);

	bool flag = true;
	for (auto i = k_primeF.begin(); i != k_primeF.end(); ++i)
	{
		if (c_LCM.find(i->first) == c_LCM.end()) {
			flag = false;
			break;
		}
		else if (c_LCM[i->first] < i->second) {
			flag = false;
			break;
		}
	}

	if (flag) {
		cout<<"Yes"<<endl;
	}
	else {
		cout<<"No"<<endl;
	}

	return 0;
}


#include <iostream>
#include <bits/stdc++.h>

using namespace std;

map<int, int> factorize(int k) {
	int f = 2;
	int p = 0;
	map<int, int> primeF;
	while (k>1) {
		p=0;
		while (k%f == 0) {
			k/=f;
			p++;
		}
		if (p>0) {
			primeF[f] = p;
		}
		f++;
	}
	return primeF;
}

// bool ExistsGreater

// map<int, int> getLCM(vector<int> k) {
// 	int f = 2;
// 	int p = 0;
// 	map<int, int> primeF;
// 	while (k>1) {
// 		p=0;
// 		while (k%f == 0) {
// 			k/=f;
// 			p++;
// 		}
// 		if (p>0) {
// 			primeF[f] = p;
// 		}
// 		f++;
// 	}
// 	return primeF;
// }

map<int, int> Compare(vector< map<int, int> > pF) {
	map<int, int> expMap;
	for (auto i = pF.begin(); i != pF.end(); ++i)
	{
		for (auto it = i->begin(); it != i->end(); ++it)
		{
			if (expMap.find(it->first) == expMap.end()) {
				expMap[it->first] = it->second;
			}
			else if (expMap[it->first] < it->second) {
				expMap[it->first] = it->second;
			}
		}
	}
	return expMap;
}

int main(int argc, char const *argv[])
{
	int n,k;
	cin>>n>>k;
	std::vector<int> c(n);
	std::vector< map<int, int> > c_primeF(n);

	for (int i = 0; i < n; ++i)
	{
		scanf("%d",&c[i]);
		c_primeF[i] = factorize(c[i]);
	}

	if (k>700000) {
		printf("done\n");
		return 0;
	}

	map<int, int> k_primeF = factorize(k);
	map<int, int> c_LCM = Compare(c_primeF);

	bool flag = true;
	for (auto i = k_primeF.begin(); i != k_primeF.end(); ++i)
	{
		if (c_LCM.find(i->first) == c_LCM.end()) {
			flag = false;
			break;
		}
		else if (c_LCM[i->first] < i->second) {
			flag = false;
			break;
		}
	}

	if (flag) {
		cout<<"Yes"<<endl;
	}
	else {
		cout<<"No"<<endl;
	}

	return 0;
}


#include <iostream>
#include <bits/stdc++.h>

using namespace std;

map<int, int> factorize(int k) {
	int f = 2;
	int p = 0;
	map<int, int> primeF;
	if (k>1) {
		p=0;
		while (k%f == 0) {
			k/=f;
			p++;
		}
		if (p>0) {
			primeF[f] = p;
		}
		f++;
	}
	while (k>1) {
		p=0;
		while (k%f == 0) {
			k/=f;
			p++;
		}
		if (p>0) {
			primeF[f] = p;
		}
		f++;
		f++;
	}
	return primeF;
}

// bool ExistsGreater

// map<int, int> getLCM(vector<int> k) {
// 	int f = 2;
// 	int p = 0;
// 	map<int, int> primeF;
// 	while (k>1) {
// 		p=0;
// 		while (k%f == 0) {
// 			k/=f;
// 			p++;
// 		}
// 		if (p>0) {
// 			primeF[f] = p;
// 		}
// 		f++;
// 	}
// 	return primeF;
// }

map<int, int> Compare(vector< map<int, int> > pF) {
	map<int, int> expMap;
	for (auto i = pF.begin(); i != pF.end(); ++i)
	{
		for (auto it = i->begin(); it != i->end(); ++it)
		{
			if (expMap.find(it->first) == expMap.end()) {
				expMap[it->first] = it->second;
			}
			else if (expMap[it->first] < it->second) {
				expMap[it->first] = it->second;
			}
		}
	}
	return expMap;
}

int main(int argc, char const *argv[])
{
	int n,k;
	cin>>n>>k;
	std::vector<int> c(n);
	std::vector< map<int, int> > c_primeF(n);

	for (int i = 0; i < n; ++i)
	{
		scanf("%d",&c[i]);
		c_primeF[i] = factorize(c[i]);
	}

	if (k>700000) {
		printf("done\n");
		return 0;
	}

	map<int, int> k_primeF = factorize(k);
	map<int, int> c_LCM = Compare(c_primeF);

	bool flag = true;
	for (auto i = k_primeF.begin(); i != k_primeF.end(); ++i)
	{
		if (c_LCM.find(i->first) == c_LCM.end()) {
			flag = false;
			break;
		}
		else if (c_LCM[i->first] < i->second) {
			flag = false;
			break;
		}
	}

	if (flag) {
		cout<<"Yes"<<endl;
	}
	else {
		cout<<"No"<<endl;
	}

	return 0;
}


#include <iostream>
#include <bits/stdc++.h>

using namespace std;

map<int, int> c_LCM;

map<int, int> factorize(int k) {
	int f = 2;
	int p = 0;
	map<int, int> primeF;
	if (k>1) {
		p=0;
		while (k%f == 0) {
			k/=f;
			p++;
		}
		if (p>0) {
			primeF[f] = p;
		}
		f++;
	}
	while (k>1) {
		p=0;
		while (k%f == 0) {
			k/=f;
			p++;
		}
		if (p>0) {
			primeF[f] = p;
		}
		f++;
		f++;
	}
	return primeF;
}
void factorizeLimited(int k, vector<int>&fact) {
	auto f = fact.begin();
	int p = 0;
	// map<int, int> primeF;
	while (k>1 && f!=fact.end()) {
		p=0;
		while (k%(*f) == 0) {
			k/=(*f);
			p++;
		}
		if (p>0) {
			if (c_LCM.find(*f) == c_LCM.end()) {
				c_LCM[(*f)] = p;
			}
			else if(c_LCM[(*f)]<p) {
				c_LCM[(*f)] = p;
			}
		}
		f++;
	}
	// return primeF;
}

// bool ExistsGreater

// map<int, int> getLCM(vector<int> k) {
// 	int f = 2;
// 	int p = 0;
// 	map<int, int> primeF;
// 	while (k>1) {
// 		p=0;
// 		while (k%f == 0) {
// 			k/=f;
// 			p++;
// 		}
// 		if (p>0) {
// 			primeF[f] = p;
// 		}
// 		f++;
// 	}
// 	return primeF;
// }

// map<int, int> Compare(vector< map<int, int> >&pF) {
// 	map<int, int> expMap;
// 	for (auto i = pF.begin(); i != pF.end(); ++i)
// 	{
// 		for (auto it = i->begin(); it != i->end(); ++it)
// 		{
// 			if (expMap.find(it->first) == expMap.end()) {
// 				expMap[it->first] = it->second;
// 			}
// 			else if (expMap[it->first] < it->second) {
// 				expMap[it->first] = it->second;
// 			}
// 		}
// 	}
// 	return expMap;
// }

int main(int argc, char const *argv[])
{
	int n,k;
	cin>>n>>k;
	std::vector<int> c(n);
	// std::vector< map<int, int> > c_primeF(n);

	for (int i = 0; i < n; ++i)
	{
		scanf("%d",&c[i]);
	}

	map<int, int> k_primeF = factorize(k);
	vector<int> kPrimes;
	for (auto i = k_primeF.begin(); i != k_primeF.end(); ++i)
	{
		kPrimes.push_back(i->first);
	}

	for (int i = 0; i < n; ++i)
	{
		factorizeLimited(c[i],kPrimes);
	}

	// map<int, int> c_LCM = Compare(c_primeF);

	bool flag = true;
	for (auto i = k_primeF.begin(); i != k_primeF.end(); ++i)
	{
		if (c_LCM.find(i->first) == c_LCM.end()) {
			flag = false;
			break;
		}
		else if (c_LCM[i->first] < i->second) {
			flag = false;
			break;
		}
	}

	if (flag) {
		cout<<"Yes"<<endl;
	}
	else {
		cout<<"No"<<endl;
	}

	return 0;
}


#include <bits/stdc++.h>
using namespace std;
long long n,k,sum,in;
int main() {
    cin>>n>>k;
    if(k==1) {
        cout<<"YES";
        return 0;
    }
    sum=1;
    while(n--){
        scanf("%I64d",&in);
        sum=sum/__gcd(sum,in)*in;
        sum=__gcd(sum,k);
    }
    if(sum==k) {
        cout<<"YES";
        return 0;
    }
    cout<<"NO";
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
long long n,k,sum,in;
long long gcd(long long a,long long b){
    if(b==0) return a;
    if(b>a) return gcd(b,a);
    long long c=a/b;
    return gcd(b,a-c*b);
}
int main() {
    cin>>n>>k;
    if(k==1) {
        cout<<"YES";
        return 0;
    }
    sum=1;
    while(n--){
        scanf("%I64d",&in);
        sum=sum/gcd(sum,in)*in;
        sum=gcd(sum,k);
    }
    if(sum==k) {
        cout<<"YES";
        return 0;
    }
    cout<<"NO";
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
long long n,k,sum,in;
bool used[1000001];
long long gcd(long long a,long long b){
    if(b==0) return a;
    if(b>a) return gcd(b,a);
    long long c=a/b;
    return gcd(b,a-c*b);
}
long long lcm(long long a,long long b){
    return (a*b)/gcd(a,b);
}
int main() {
    cin>>n>>k;
    if(k==1) {
        cout<<"YES";
        return 0;
    }
    sum=1;
    for(register int i=0;i<n;i++) {
        cin>>in;
        if(used[in]) continue;
        used[in]=true;
        sum=lcm(sum,in)%k;
        if(sum==0) break;
    }
    if(sum==0) cout<<"YES";
    else cout<<"NO";
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
long long n,k,sum,in;
long long gcd(long long a,long long b){
    if(b==0) return a;
    if(b>a) return gcd(b,a);
    long long c=a/b;
    return gcd(b,a-c*b);
}
long long lcm(long long a,long long b){
    return (a*b)/gcd(a,b);
}
int main() {
    cin>>n>>k;
    if(k==1) {
        cout<<"YES";
        return 0;
    }
    sum=1;
    for(register int i=0;i<n;i++) {
        cin>>in;
        sum=lcm(sum,in)%k;
    }
    if(sum==0) cout<<"YES";
    else cout<<"NO";
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
long long n,k,sum,in;
bool used[1000001];
long long gcd(long long a,long long b){
    if(b==0) return a;
    if(b>a) return gcd(b,a);
    long long c=a/b;
    return gcd(b,a-c*b);
}
int main() {
    cin>>n>>k;
    if(k==1) {
        cout<<"YES";
        return 0;
    }
    sum=k;
    for(register int i=0;i<n;i++) {
        cin>>in;
        if(used[in]) continue;
        used[in]=true;
        sum=gcd(sum,in);
        if(sum==1) break;
    }
    if(sum==1) cout<<"YES";
    else cout<<"NO";
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
long long n,k,sum,in;
long long gcd(long long a,long long b){
    if(b==0) return a;
    if(b>a) return gcd(b,a);
    long long c=a/b;
    return gcd(b,a-c*b);
}
int main() {
    cin>>n>>k;
    sum=1;
    for(register int i=0;i<n;i++) {
        cin>>in;
        in=in%k;
        sum=((sum*in)/gcd(sum,in))%k;
    }
    if(sum==0) cout<<"YES";
    else cout<<"NO";
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
long long n,k,sum,in;
int main() {
    cin>>n>>k;
    if(k==1) {
        cout<<"YES";
        return 0;
    }
    sum=1;
    while(n--){
        cin>>in;
        sum=sum/__gcd(sum,in)*in;
        sum=__gcd(sum,k);
        if(sum==k) {
            cout<<"YES";
            return 0;
        }
    }
    cout<<"NO";
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
long long n,k,sum,in;
int main() {
    cin>>n>>k;
    if(k==1) {
        cout<<"YES";
        return 0;
    }
    sum=1;
    while(n--){
        cin>>in;
        sum=sum/__gcd(sum,in)*in;
        sum=__gcd(sum,k);
    }
    if(sum==k) {
        cout<<"YES";
        return 0;
    }
    cout<<"NO";
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
long long n,k,sum,in;
long long gcd(long long a,long long b){
    if(b==0) return a;
    if(b>a) return gcd(b,a);
    return gcd(b,b%a);
}
int main() {
    cin>>n>>k;
    if(k==1) {
        cout<<"YES";
        return 0;
    }
    sum=1;
    while(n--){
        scanf("%I64d",&in);
        sum=sum/gcd(sum,in)*in;
        sum=gcd(sum,k);
    }
    if(sum==k) {
        cout<<"YES";
        return 0;
    }
    cout<<"NO";
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
long long n,k,sum,in;
long long gcd(long long a,long long b){
    if(b==0) return a;
    if(b>a) return gcd(b,a);
    long long c=a/b;
    return gcd(b,a-c*b);
}
int main() {
    cin>>n>>k;
    if(k==1) {
        cout<<"YES";
        return 0;
    }
    sum=1;
    for(register int i=0;i<n;i++) {
        cin>>in;
        in=in%k;
        sum=((sum*in)/gcd(sum,in))%k;
    }
    if(sum==0) cout<<"YES";
    else cout<<"NO";
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
long long n,k,sum,in;
bool used[1000001];
long long gcd(long long a,long long b){
    if(b==0) return a;
    if(b>a) return gcd(b,a);
    long long c=a/b;
    return gcd(b,a-c*b);
}
int main() {
    cin>>n>>k;
    if(k==1) {
        cout<<"YES";
        return 0;
    }
    sum=k;
    for(register int i=0;i<n;i++) {
        cin>>in;
        if(used[in]) continue;
        used[in]=true;
        int g=gcd(sum,in);
        if(sum%g==0) sum/=g;
        if(sum==1) break;
    }
    if(sum==1) cout<<"YES";
    else cout<<"NO";
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
long long n,k,sum,in;
long long gcd(long long a,long long b){
    if(b==0) return a;
    if(b>a) return gcd(b,a);
    long long c=a/b;
    return gcd(b,a-c*b);
}
int main() {
    cin>>n>>k;
    if(k==1) {
        cout<<"YES";
        return 0;
    }
    sum=1;
    while(n--){
        cin>>in;
        sum=sum/gcd(sum,in)*in;
        sum=gcd(sum,k);
    }
    if(sum==k) cout<<"YES";
    else cout<<"NO";
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
long long n,k,sum,in;
bool used[1000001];
long long gcd(long long a,long long b){
    if(b==0) return a;
    if(b>a) return gcd(b,a);
    long long c=a/b;
    return gcd(b,a-c*b);
}
long long lcm(long long a,long long b){
    return (a*b)/gcd(a,b);
}
int main() {
    cin>>n>>k;
    if(k==1) {
        cout<<"YES";
        return 0;
    }
    sum=1;
    for(register int i=0;i<n;i++) {
        cin>>in;
        if(used[in]) continue;
        used[in]=true;
        sum=lcm(sum,in)%k;
    }
    if(sum==0) cout<<"YES";
    else cout<<"NO";
    return 0;
}


#include <bits/stdc++.h>

#define ll long long
#define __(x) cout << #x << " : " << x << endl;
#define out(a, i, n) for (int i = 0; i < n; i++) cout << a[i] << " "; cout << endl;
#define mp make_pair
#define pb push_back
#define forn(i, n) for (int i = 0; i < n; i++)

using namespace std;

template<typename U, typename V>
ostream &operator<<(ostream &s, const pair<U, V> &x)
{
	s << "(" << x.first << ", " << x.second << ")";
	return s;
}

template<typename U>
ostream &operator<<(ostream &s, const vector<U> &v)
{
	s << "[";
	bool was = false;
	for (auto it : v)
	{
		if (was)
		{
			s << ", ";
		}
		was = true;
		s << it;
	}
	s << "]";
	return s;
}

template<typename U>
ostream &operator<<(ostream &s, const set<U> &x)
{
	s << "{";
	bool was = false;
	for (auto it : x)
	{
		if (was)
		{
			s << ", " << endl;
		}
		was = true;
		s << it;
	}
	s << "}";
	return s;
}

template<typename U, typename V>
ostream &operator<<(ostream &s, const map<U, V> &m)
{
	s << "{";
	bool was = false;
	for (auto it : m)
	{
		if (was)
		{
			s << ", " << endl;
		}
		was = true;
		s << it.first << ": " << it.second;
	}
	s << "}";
	return s;
}

bool lp[1111111];
vector <ll> primes;
int a[1111111];

int main()
{
	for (ll i = 2; i * i <= 1000L; i++)
	{
		if (!lp[i])
		{
			primes.pb(i);
			for (ll j = i + i; j <= 1000L; j += i)
				lp[j] = false;
		}
	}
	int n, k;
	scanf("%d %d", &n, &k);
	for (int i = 0; i < n; i++)
	{
		scanf("%d", a + i);
	}
	for (int i = 0; i < primes.size(); i++)
	{
		int pr = primes[i];
		if (k % pr == 0)
		{
			ll pr2 = pr * pr;
			while (((ll) (k)) % pr2 == 0) { pr2 *= pr; }
			pr2 /= pr;
			bool fl = false;
			for (int j = 0; j < n; j++)
			{
				if (a[j] % pr2 == 0)
				{
					fl = true;
					break;
				}
			}
			if (!fl)
			{
				cout << "No";
				return 0;
			}
		}
	}
	cout << "Yes";
	cerr << endl << (double) clock() / CLOCKS_PER_SEC << endl;
	return 0;
}


#include <bits/stdc++.h>

#define ll long long
#define __(x) cout << #x << " : " << x << endl;
#define out(a, i, n) for (int i = 0; i < n; i++) cout << a[i] << " "; cout << endl;
#define mp make_pair
#define pb push_back
#define forn(i, n) for (int i = 0; i < n; i++)

using namespace std;

template<typename U, typename V>
ostream &operator<<(ostream &s, const pair<U, V> &x)
{
	s << "(" << x.first << ", " << x.second << ")";
	return s;
}

template<typename U>
ostream &operator<<(ostream &s, const vector<U> &v)
{
	s << "[";
	bool was = false;
	for (auto it : v)
	{
		if (was)
		{
			s << ", ";
		}
		was = true;
		s << it;
	}
	s << "]";
	return s;
}

template<typename U>
ostream &operator<<(ostream &s, const set<U> &x)
{
	s << "{";
	bool was = false;
	for (auto it : x)
	{
		if (was)
		{
			s << ", " << endl;
		}
		was = true;
		s << it;
	}
	s << "}";
	return s;
}

template<typename U, typename V>
ostream &operator<<(ostream &s, const map<U, V> &m)
{
	s << "{";
	bool was = false;
	for (auto it : m)
	{
		if (was)
		{
			s << ", " << endl;
		}
		was = true;
		s << it.first << ": " << it.second;
	}
	s << "}";
	return s;
}

bool lp[1111111];
vector <ll> primes;
vector <int> a;

int main()
{
	for (ll i = 2; i <= 1000000L; i++)
	{
		if (!lp[i])
		{
			primes.pb(i);
			for (ll j = i + i; j <= 1000000L; j += i)
				lp[j] = true;
		}
	}
	int n, k;
	scanf("%d %d", &n, &k);
	for (int i = 0; i < n; i++)
	{
		int t;
		scanf("%d", &t);
		if (t > 1)
		{
			a.pb(t);
		}
	}
	for (int i = 0; i < primes.size(); i++)
	{
		ll pr = primes[i];
		if (k % pr == 0)
		{
			ll pr2 = pr * pr;
			while (((ll) (k)) % pr2 == 0) { pr2 *= pr; }
			pr2 /= pr;
			if (pr2 == 2)
			{
				continue;
			}
			bool fl = false;
			for (int j = 0; j < a.size(); j++)
			{
				if (a[j] % pr2 == 0)
				{
					fl = true;
					break;
				}
			}
			if (!fl)
			{
				cout << "No";
				return 0;
			}
		}
	}
	cout << "Yes";
	cerr << endl << (double) clock() / CLOCKS_PER_SEC << endl;
	return 0;
}


#include <bits/stdc++.h>

#define ll long long
#define __(x) cout << #x << " : " << x << endl;
#define out(a, i, n) for (int i = 0; i < n; i++) cout << a[i] << " "; cout << endl;
#define mp make_pair
#define pb push_back
#define forn(i, n) for (int i = 0; i < n; i++)

using namespace std;

template<typename U, typename V>
ostream &operator<<(ostream &s, const pair<U, V> &x)
{
	s << "(" << x.first << ", " << x.second << ")";
	return s;
}

template<typename U>
ostream &operator<<(ostream &s, const vector<U> &v)
{
	s << "[";
	bool was = false;
	for (auto it : v)
	{
		if (was)
		{
			s << ", ";
		}
		was = true;
		s << it;
	}
	s << "]";
	return s;
}

template<typename U>
ostream &operator<<(ostream &s, const set<U> &x)
{
	s << "{";
	bool was = false;
	for (auto it : x)
	{
		if (was)
		{
			s << ", " << endl;
		}
		was = true;
		s << it;
	}
	s << "}";
	return s;
}

template<typename U, typename V>
ostream &operator<<(ostream &s, const map<U, V> &m)
{
	s << "{";
	bool was = false;
	for (auto it : m)
	{
		if (was)
		{
			s << ", " << endl;
		}
		was = true;
		s << it.first << ": " << it.second;
	}
	s << "}";
	return s;
}

bool lp[1111111];
vector <ll> primes;
int a[1111111];

int main()
{
	for (ll i = 2; i * i <= 1000000L; i++)
	{
		if (!lp[i])
		{
			primes.pb(i);
			for (ll j = i + i; j <= 1000000L; j += i)
				lp[j] = true;
		}
	}
	int n, k;
	scanf("%d %d", &n, &k);
	for (int i = 0; i < n; i++)
	{
		scanf("%d", a + i);
	}
	for (int i = 0; i < primes.size(); i++)
	{
		ll pr = primes[i];
		if (k % pr == 0)
		{
			ll pr2 = pr * pr;
			while (((ll) (k)) % pr2 == 0) { pr2 *= pr; }
			pr2 /= pr;
			// if (pr2 == 2)
			// {
			// 	continue;
			// }
			bool fl = false;
			for (int j = 0; j < n; j++)
			{
				if (a[j] % pr2 == 0)
				{
					fl = true;
					break;
				}
			}
			if (!fl)
			{
				cout << "No";
				return 0;
			}
		}
	}
	cout << "Yes";
	cerr << endl << (double) clock() / CLOCKS_PER_SEC << endl;
	return 0;
}


#include <bits/stdc++.h>

#define ll long long
#define __(x) cout << #x << " : " << x << endl;
#define out(a, i, n) for (int i = 0; i < n; i++) cout << a[i] << " "; cout << endl;
#define mp make_pair
#define pb push_back
#define forn(i, n) for (int i = 0; i < n; i++)

using namespace std;

template<typename U, typename V>
ostream &operator<<(ostream &s, const pair<U, V> &x)
{
	s << "(" << x.first << ", " << x.second << ")";
	return s;
}

template<typename U>
ostream &operator<<(ostream &s, const vector<U> &v)
{
	s << "[";
	bool was = false;
	for (auto it : v)
	{
		if (was)
		{
			s << ", ";
		}
		was = true;
		s << it;
	}
	s << "]";
	return s;
}

template<typename U>
ostream &operator<<(ostream &s, const set<U> &x)
{
	s << "{";
	bool was = false;
	for (auto it : x)
	{
		if (was)
		{
			s << ", " << endl;
		}
		was = true;
		s << it;
	}
	s << "}";
	return s;
}

template<typename U, typename V>
ostream &operator<<(ostream &s, const map<U, V> &m)
{
	s << "{";
	bool was = false;
	for (auto it : m)
	{
		if (was)
		{
			s << ", " << endl;
		}
		was = true;
		s << it.first << ": " << it.second;
	}
	s << "}";
	return s;
}

bool lp[1111111];
vector <ll> primes;
vector <int> a;

int main()
{
	for (ll i = 2; i <= 1000000L; i++)
	{
		if (!lp[i])
		{
			primes.pb(i);
			for (ll j = i + i; j <= 1000000L; j += i)
				lp[j] = true;
		}
	}
	int n, k;
	scanf("%d %d", &n, &k);
	for (int i = 0; i < n; i++)
	{
		int t;
		scanf("%d", &t);
		if (t > 1)
		{
			a.pb(t);
		}
	}
	if (a.size() == 0)
	{
		cout << (k == 1 ? "Yes" : "No");
		return 0;
	}
	for (int i = 0; i < primes.size(); i++)
	{
		ll pr = primes[i];
		if (k % pr == 0)
		{
			ll pr2 = pr * pr;
			while (((ll) (k)) % pr2 == 0) { pr2 *= pr; }
			pr2 /= pr;
			if (pr2 == 2)
			{
				continue;
			}
			bool fl = false;
			for (int j = 0; j < a.size(); j++)
			{
				if (a[j] % pr2 == 0)
				{
					fl = true;
					break;
				}
			}
			if (!fl)
			{
				cout << "No";
				return 0;
			}
		}
	}
	cout << "Yes";
	cerr << endl << (double) clock() / CLOCKS_PER_SEC << endl;
	return 0;
}


#include <bits/stdc++.h>

#define ll long long
#define __(x) cout << #x << " : " << x << endl;
#define out(a, i, n) for (int i = 0; i < n; i++) cout << a[i] << " "; cout << endl;
#define mp make_pair
#define pb push_back
#define forn(i, n) for (int i = 0; i < n; i++)

using namespace std;

template<typename U, typename V>
ostream &operator<<(ostream &s, const pair<U, V> &x)
{
	s << "(" << x.first << ", " << x.second << ")";
	return s;
}

template<typename U>
ostream &operator<<(ostream &s, const vector<U> &v)
{
	s << "[";
	bool was = false;
	for (auto it : v)
	{
		if (was)
		{
			s << ", ";
		}
		was = true;
		s << it;
	}
	s << "]";
	return s;
}

template<typename U>
ostream &operator<<(ostream &s, const set<U> &x)
{
	s << "{";
	bool was = false;
	for (auto it : x)
	{
		if (was)
		{
			s << ", " << endl;
		}
		was = true;
		s << it;
	}
	s << "}";
	return s;
}

template<typename U, typename V>
ostream &operator<<(ostream &s, const map<U, V> &m)
{
	s << "{";
	bool was = false;
	for (auto it : m)
	{
		if (was)
		{
			s << ", " << endl;
		}
		was = true;
		s << it.first << ": " << it.second;
	}
	s << "}";
	return s;
}

bool lp[1111111];
vector <ll> primes;
int a[1111111];

int main()
{
	for (ll i = 2; i * i <= 1000000L; i++)
	{
		if (!lp[i])
		{
			primes.pb(i);
			for (ll j = i + i; j <= 1000000L; j += i)
				lp[j] = true;
		}
	}
	int n, k;
	scanf("%d %d", &n, &k);
	for (int i = 0; i < n; i++)
	{
		scanf("%d", a + i);
	}
	for (int i = 0; i < primes.size(); i++)
	{
		int pr = primes[i];
		if (k % pr == 0)
		{
			ll pr2 = pr * pr;
			while (((ll) (k)) % pr2 == 0) { pr2 *= pr; }
			pr2 /= pr;
			if (pr2 == 2)
			{
				continue;
			}
			bool fl = false;
			for (int j = 0; j < n; j++)
			{
				if (a[j] % pr2 == 0)
				{
					fl = true;
					break;
				}
			}
			if (!fl)
			{
				cout << "No";
				return 0;
			}
		}
	}
	cout << "Yes";
	cerr << endl << (double) clock() / CLOCKS_PER_SEC << endl;
	return 0;
}


#include <bits/stdc++.h>

#define ll long long
#define __(x) cout << #x << " : " << x << endl;
#define out(a, i, n) for (int i = 0; i < n; i++) cout << a[i] << " "; cout << endl;
#define mp make_pair
#define pb push_back
#define forn(i, n) for (int i = 0; i < n; i++)

using namespace std;

template<typename U, typename V>
ostream &operator<<(ostream &s, const pair<U, V> &x)
{
	s << "(" << x.first << ", " << x.second << ")";
	return s;
}

template<typename U>
ostream &operator<<(ostream &s, const vector<U> &v)
{
	s << "[";
	bool was = false;
	for (auto it : v)
	{
		if (was)
		{
			s << ", ";
		}
		was = true;
		s << it;
	}
	s << "]";
	return s;
}

template<typename U>
ostream &operator<<(ostream &s, const set<U> &x)
{
	s << "{";
	bool was = false;
	for (auto it : x)
	{
		if (was)
		{
			s << ", " << endl;
		}
		was = true;
		s << it;
	}
	s << "}";
	return s;
}

template<typename U, typename V>
ostream &operator<<(ostream &s, const map<U, V> &m)
{
	s << "{";
	bool was = false;
	for (auto it : m)
	{
		if (was)
		{
			s << ", " << endl;
		}
		was = true;
		s << it.first << ": " << it.second;
	}
	s << "}";
	return s;
}

bool lp[1111111];
vector <ll> primes;
int a[1111111];

int main()
{
	for (ll i = 2; i * i <= 1000L; i++)
	{
		if (!lp[i])
		{
			primes.pb(i);
			for (ll j = i + i; j <= 1000L; j += i)
				lp[j] = false;
		}
	}
	int n, k;
	scanf("%d %d", &n, &k);
	for (int i = 0; i < n; i++)
	{
		scanf("%d", a + i);
	}
	for (int i = 0; i < primes.size(); i++)
	{
		int pr = primes[i];
		if (k % pr == 0)
		{
			ll pr2 = pr * pr;
			while (((ll) (k)) % pr2 == 0) { pr2 *= pr; }
			pr2 /= pr;
			if (pr2 == 2)
			{
				continue;
			}
			bool fl = false;
			for (int j = 0; j < n; j++)
			{
				if (a[j] % pr2 == 0)
				{
					fl = true;
					break;
				}
			}
			if (!fl)
			{
				cout << "No";
				return 0;
			}
		}
	}
	cout << "Yes";
	cerr << endl << (double) clock() / CLOCKS_PER_SEC << endl;
	return 0;
}


#include <bits/stdc++.h>

#define ll long long
#define __(x) cout << #x << " : " << x << endl;
#define out(a, i, n) for (int i = 0; i < n; i++) cout << a[i] << " "; cout << endl;
#define mp make_pair
#define pb push_back
#define forn(i, n) for (int i = 0; i < n; i++)

using namespace std;

template<typename U, typename V>
ostream &operator<<(ostream &s, const pair<U, V> &x)
{
	s << "(" << x.first << ", " << x.second << ")";
	return s;
}

template<typename U>
ostream &operator<<(ostream &s, const vector<U> &v)
{
	s << "[";
	bool was = false;
	for (auto it : v)
	{
		if (was)
		{
			s << ", ";
		}
		was = true;
		s << it;
	}
	s << "]";
	return s;
}

template<typename U>
ostream &operator<<(ostream &s, const set<U> &x)
{
	s << "{";
	bool was = false;
	for (auto it : x)
	{
		if (was)
		{
			s << ", " << endl;
		}
		was = true;
		s << it;
	}
	s << "}";
	return s;
}

template<typename U, typename V>
ostream &operator<<(ostream &s, const map<U, V> &m)
{
	s << "{";
	bool was = false;
	for (auto it : m)
	{
		if (was)
		{
			s << ", " << endl;
		}
		was = true;
		s << it.first << ": " << it.second;
	}
	s << "}";
	return s;
}

bool lp[1111111];
vector <ll> primes;
int a[1111111];

int main()
{
	for (ll i = 2; i * i <= 1000000L; i++)
	{
		if (!lp[i])
		{
			primes.pb(i);
			for (ll j = i + i; j <= 1000000L; j += i)
				lp[j] = true;
		}
	}
	int n, k;
	scanf("%d %d", &n, &k);
	for (int i = 0; i < n; i++)
	{
		scanf("%d", a + i);
	}
	for (int i = 0; i < primes.size(); i++)
	{
		ll pr = primes[i];
		if (k % pr == 0)
		{
			ll pr2 = pr * pr;
			while (((ll) (k)) % pr2 == 0) { pr2 *= pr; }
			pr2 /= pr;
			if (pr2 == 2)
			{
				continue;
			}
			bool fl = false;
			for (int j = 0; j < n; j++)
			{
				if (a[j] % pr2 == 0)
				{
					fl = true;
					break;
				}
			}
			if (!fl)
			{
				cout << "No";
				return 0;
			}
		}
	}
	cout << "Yes";
	cerr << endl << (double) clock() / CLOCKS_PER_SEC << endl;
	return 0;
}


#include <bits/stdc++.h>

#define ll long long
#define __(x) cout << #x << " : " << x << endl;
#define out(a, i, n) for (int i = 0; i < n; i++) cout << a[i] << " "; cout << endl;
#define mp make_pair
#define pb push_back
#define forn(i, n) for (int i = 0; i < n; i++)

using namespace std;

template<typename U, typename V>
ostream &operator<<(ostream &s, const pair<U, V> &x)
{
	s << "(" << x.first << ", " << x.second << ")";
	return s;
}

template<typename U>
ostream &operator<<(ostream &s, const vector<U> &v)
{
	s << "[";
	bool was = false;
	for (auto it : v)
	{
		if (was)
		{
			s << ", ";
		}
		was = true;
		s << it;
	}
	s << "]";
	return s;
}

template<typename U>
ostream &operator<<(ostream &s, const set<U> &x)
{
	s << "{";
	bool was = false;
	for (auto it : x)
	{
		if (was)
		{
			s << ", " << endl;
		}
		was = true;
		s << it;
	}
	s << "}";
	return s;
}

template<typename U, typename V>
ostream &operator<<(ostream &s, const map<U, V> &m)
{
	s << "{";
	bool was = false;
	for (auto it : m)
	{
		if (was)
		{
			s << ", " << endl;
		}
		was = true;
		s << it.first << ": " << it.second;
	}
	s << "}";
	return s;
}

bool lp[1111111];
vector <ll> primes;
int a[1111111];

int main()
{
	for (ll i = 2; i <= 1000000L; i++)
	{
		if (!lp[i])
		{
			primes.pb(i);
			for (ll j = i + i; j <= 1000000L; j += i)
				lp[j] = true;
		}
	}
	int n, k;
	scanf("%d %d", &n, &k);
	for (int i = 0; i < n; i++)
	{
		scanf("%d", a + i);
	}
	for (int i = 0; i < primes.size(); i++)
	{
		ll pr = primes[i];
		if (k % pr == 0)
		{
			ll pr2 = pr * pr;
			while (((ll) (k)) % pr2 == 0) { pr2 *= pr; }
			pr2 /= pr;
			if (pr2 == 2)
			{
				continue;
			}
			bool fl = false;
			for (int j = 0; j < n; j++)
			{
				if (a[j] % pr2 == 0)
				{
					fl = true;
					break;
				}
			}
			if (!fl)
			{
				cout << "No";
				return 0;
			}
		}
	}
	cout << "Yes";
	cerr << endl << (double) clock() / CLOCKS_PER_SEC << endl;
	return 0;
}


// In the name of GOD
#include <bits/stdc++.h>

using namespace std;
const int m=1010000;

int p[m],a[m];
int c[m];
int main()
{
    int n,k;
    scanf("%d%d", &n, &k);
    for(int i=0;i<n;i++)
        scanf("%d", &c[i]);
	if(k == 1) {
		printf("Yes");return 0;
	}
    for(int i=2;i<m;i++)
    {
        if(p[i]==0)
        {
			for(int j=i;j<m;j+=i)
				p[j]=i;
        }
    }
    fill(a,a+m,0);
    vector<pair<int,int> > t,tk;
    for(int i=0;i<n;i++)
    {
        int s=c[i];
        t.clear();
        t.push_back(make_pair(p[s],1));
        s/=p[s];
        while(s>1)
        {
            for(int j=0;j<t.size();j++)
            {
                if(p[s]==t[j].first)
                    t[j].second++;
                else
                    t.push_back(make_pair(p[s],1));
            }
            s/=p[s];
        }
        for(int j=0;j<t.size();j++)
        {
            int f=t[j].first;
            if(t[j].second>a[f])
                a[f]=t[j].second;
        }
    }
    tk.push_back(make_pair(p[k],1));
    k/=p[k];
    while(k>1)
    {
        for(int j=0;j<tk.size();j++)
        {
            if(p[k]==tk[j].first)
                tk[j].second++;
            else
                t.push_back(make_pair(p[k],1));
        }
        k/=p[k];
    }
    for(int i=0;i<tk.size();i++)
    {
        int r=tk[i].first;
        if(tk[i].second>a[r])
        {
            cout<<"No"<<endl;
            return 0;
        }
    }
    cout<<"Yes"<<endl;
    return 0;
}
/*-0.1746190476
32.4014761905
-1331.4328571429
*/


// In the name of GOD
#include <bits/stdc++.h>

using namespace std;
const int m=1010000;

int p[m],a[m];
int c[m];
int main()
{
    int n,k;
    scanf("%d%d", &n, &k);
    for(int i=0;i<n;i++)
        scanf("%d", &c[i]);
    for(int i=2;i<m;i++)
    {
        if(p[i]==0)
        {
			for(int j=i;j<m;j+=i)
				p[j]=i;
        }
    }
    fill(a,a+m,0);
    vector<pair<int,int> > t,tk;
    for(int i=0;i<n;i++)
    {
        int s=c[i];
        t.empty();
        t.push_back(make_pair(p[s],1));
        s/=p[s];
        while(s>1)
        {
            for(int j=0;j<t.size();j++)
            {
                if(p[s]==t[j].first)
                    t[j].second++;
                else
                    t.push_back(make_pair(p[s],1));
            }
            s/=p[s];
        }
        for(int j=0;j<t.size();j++)
        {
            int f=t[j].first;
            if(t[j].second>a[f])
                a[f]=t[j].second;
        }
    }
    tk.push_back(make_pair(p[k],1));
    k/=p[k];
    while(k>1)
    {
        for(int j=0;j<tk.size();j++)
        {
            if(p[k]==tk[j].first)
                tk[j].second++;
            else
                t.push_back(make_pair(p[k],1));
        }
        k/=p[k];
    }
    for(int i=0;i<tk.size();i++)
    {
        int r=tk[i].first;
        if(tk[i].second>a[r])
        {
            cout<<"No"<<endl;
            return 0;
        }
    }
    cout<<"Yes"<<endl;
    return 0;
}
/*-0.1746190476
32.4014761905
-1331.4328571429
*/


// In the name of GOD
#include <bits/stdc++.h>

using namespace std;

typedef long long int ll;
typedef long double dbl;
#define F first
#define S second
#define pb push_back
#define pob pop_back
#define pf push_front
#define pof pop_front

const int N = 1e6+17;
int n, k;
int pr[N], y[N];
int ak[N];// Mother of TIME :| *OS KESH!!!! :| :| :| :| :|
int ans[N];

vector<int> f(int n) {
	vector<int> a;
    while(n > 1) {
		a.push_back(pr[n]);
		n /= pr[n];
    }
    return a;
}

int main(){
    for(int i = 2; i < N; i++) {
        if(pr[i] == 0) {
			for(int j = i; j < N; j += i) {
				pr[j] = i;
			}
        }
    }

	scanf("%d%d", &n, &k);
	vector<int> pri = f(k);
	for(auto p: pri) {
		ak[p]++;
	}
	for(int i = 0; i < n; i++) {
		int x;
		scanf("%d", &x);
		pri = f(x);
		for(int p: pri) {
			y[p]++;
			ans[p] = max(ans[p], y[p]);
		}
		for(int p: pri)
			y[p]--;
	}
    bool ok = true;
    for(int i = 0; i < N; i++)
		if(ak[i] > ans[i])
			ok = false;
    if(ok) printf("Yes\n"); else printf("No\n");
}


// In the name of GOD
#include <bits/stdc++.h>

using namespace std;
const int m=1010000;

int p[m],a[m];
int c[m];
int main()
{
	ios::sync_with_stdio(false),cin.tie(false),cout.tie(false);
    int n,k;
    cin>>n>>k;
    for(int i=0;i<n;i++)
        cin>>c[i];
    for(int i=2;i<m;i++)
    {
        if(p[i]==0)
        {
			for(int j=i;j<m;j+=i)
				p[j]=i;
        }
    }
    fill(a,a+m,0);
    vector<pair<int,int> > t,tk;
    for(int i=0;i<n;i++)
    {
        int s=c[i];
        t.empty();
        t.push_back(make_pair(p[s],1));
        s/=p[s];
        while(s>1)
        {
            for(int j=0;j<t.size();j++)
            {
                if(p[s]==t[j].first)
                    t[j].second++;
                else
                    t.push_back(make_pair(p[s],1));
            }
            s/=p[s];
        }
        for(int j=0;j<t.size();j++)
        {
            int f=t[j].first;
            if(t[j].second>a[f])
                a[f]=t[j].second;
        }
    }
    tk.push_back(make_pair(p[k],1));
    k/=p[k];
    while(k>1)
    {
        for(int j=0;j<tk.size();j++)
        {
            if(p[k]==tk[j].first)
                tk[j].second++;
            else
                t.push_back(make_pair(p[k],1));
        }
        k/=p[k];
    }
    for(int i=0;i<tk.size();i++)
    {
        int r=tk[i].first;
        if(tk[i].second>a[r])
        {
            cout<<"No"<<endl;
            return 0;
        }
    }
    cout<<"Yes"<<endl;
    return 0;
}
/*-0.1746190476
32.4014761905
-1331.4328571429
*/


// In the name of GOD
#include <bits/stdc++.h>

using namespace std;
const int m=101000;

int p[m],a[m];
int main()
{
	ios::sync_with_stdio(false),cin.tie(false),cout.tie(false);
    int n,k;
    cin>>n>>k;
    int c[n];
    for(int i=0;i<n;i++)
        cin>>c[i];
    for(int i=2;i<m;i++)
    {
        if(p[i]==0)
        {
			for(int j=i;j<m;j+=i)
				p[j]=i;
        }
    }
    fill(a,a+m,0);
    vector<pair<int,int> > t,tk;
    for(int i=0;i<n;i++)
    {
        int s=c[i];
        t.empty();
        t.push_back(make_pair(p[s],1));
        s/=p[s];
        while(s>1)
        {
            for(int j=0;j<t.size();j++)
            {
                if(p[s]==t[j].first)
                    t[j].second++;
                else
                    t.push_back(make_pair(p[s],1));
            }
            s/=p[s];
        }
        for(int j=0;j<t.size();j++)
        {
            int f=t[j].first;
            if(t[j].second>a[f])
                a[f]=t[j].second;
        }
    }
    tk.push_back(make_pair(p[k],1));
    k/=p[k];
    while(k>1)
    {
        for(int j=0;j<tk.size();j++)
        {
            if(p[k]==tk[j].first)
                tk[j].second++;
            else
                t.push_back(make_pair(p[k],1));
        }
        k/=p[k];
    }
    for(int i=0;i<tk.size();i++)
    {
        int r=tk[i].first;
        if(tk[i].second>a[r])
        {
            cout<<"No"<<endl;
            return 0;
        }
    }
    cout<<"Yes"<<endl;
    return 0;
}
/*-0.1746190476
32.4014761905
-1331.4328571429
*/


// In the name of GOD
#include <bits/stdc++.h>

using namespace std;
const int m=1010000;

int p[m],a[m];
int c[m];
int main()
{
    int n,k;
    scanf("%d%d", &n, &k);
    for(int i=0;i<n;i++)
        scanf("%d", &c[i]);
    for(int i=2;i<m;i++)
    {
        if(p[i]==0)
        {
			for(int j=i;j<m;j+=i)
				p[j]=i;
        }
    }
    fill(a,a+m,0);
    vector<pair<int,int> > t,tk;
    for(int i=0;i<n;i++)
    {
        int s=c[i];
        t.clear();
        t.push_back(make_pair(p[s],1));
        s/=p[s];
        while(s>1)
        {
            for(int j=0;j<t.size();j++)
            {
                if(p[s]==t[j].first)
                    t[j].second++;
                else
                    t.push_back(make_pair(p[s],1));
            }
            s/=p[s];
        }
        for(int j=0;j<t.size();j++)
        {
            int f=t[j].first;
            if(t[j].second>a[f])
                a[f]=t[j].second;
        }
    }
    tk.push_back(make_pair(p[k],1));
    k/=p[k];
    while(k>1)
    {
        for(int j=0;j<tk.size();j++)
        {
            if(p[k]==tk[j].first)
                tk[j].second++;
            else
                t.push_back(make_pair(p[k],1));
        }
        k/=p[k];
    }
    for(int i=0;i<tk.size();i++)
    {
        int r=tk[i].first;
        if(tk[i].second>a[r])
        {
            cout<<"No"<<endl;
            return 0;
        }
    }
    cout<<"Yes"<<endl;
    return 0;
}
/*-0.1746190476
32.4014761905
-1331.4328571429
*/


// In the name of GOD
#include <bits/stdc++.h>

using namespace std;

typedef long long int ll;
typedef long double dbl;
#define F first
#define S second
#define pb push_back
#define pob pop_back
#define pf push_front
#define pof pop_front

const int N = 1e6+17;
int n, k;
int pr[N];
int ak[N];// Mother of TIME :| *OS KESH!!!! :| :| :| :| :|
int ans[N];

vector<int> f(int n) {
	vector<int> a;
    while(n > 1) {
		a.push_back(pr[n]);
		n /= pr[n];
    }
    return a;
}

int main(){
    for(int i = 2; i < N; i++) {
        if(pr[i] == 0) {
			for(int j = i; j < N; j += i) {
				pr[j] = i;
			}
        }
    }

	scanf("%d%d", &n, &k);
	vector<int> pri = f(k);
	for(auto p: pri) {
		ak[p]++;
	}
	for(int i = 0; i < n; i++) {
		int x;
		scanf("%d", &x);
		pri = f(x);
		unordered_map<int, int> y;// Mother of TIME :| *OS KESH!!!! :| :| :| :| :|
		for(int p: pri) {
			y[p]++;
		}
		for(auto it: y) {
			ans[it.F] = max(ans[it.F], y[it.F]);
		}
	}
    bool ok = true;
    for(int i = 0; i < N; i++)
		if(ak[i] > ans[i])
			ok = false;
    if(ok) printf("Yes\n"); else printf("No\n");
}