/* -*- coding: utf-8 -*- * * 2682.cc: No.2682 Visible Divisible - yukicoder */ #include #include using namespace std; /* constant */ const int MAX_N = 200000; /* typedef */ typedef long long ll; /* global variables */ ll as[MAX_N]; /* subroutines */ template T gcd(T m, T n) { // m >= 0, n >= 0 if (m < n) swap(m, n); while (n > 0) { T r = m % n; m = n; n = r; } return m; } /* main */ int main() { int n; ll k; scanf("%d%lld", &n, &k); for (int i = 0; i < n; i++) scanf("%lld", as + i); for (int i = 0; i < n; i++) as[i] = gcd(k, as[i]); ll l = 1; for (int i = 0; i < n; i++) { ll g = gcd(l, as[i]); l = l / g * as[i]; } if (l == k) puts("Yes"); else puts("No"); return 0; }