#include using namespace std; #include using namespace __gnu_pbds; #ifdef LOCAL #include #else #define debug(...) void() #endif gp_hash_table factor_map; void factor2(int n) { for (int i = 2; i * i <= n; i++) { if (n % i == 0) { int ex = 0; while (n % i == 0) { ex++; n /= i; } factor_map[i] += ex; } } if (n != 1) factor_map[n]++; } vector> factor(int n) { vector> res; for (int i = 2; i * i <= n; i++) { if (n % i == 0) { int ex = 0; while (n % i == 0) { ex++; n /= i; } res.push_back({i, ex}); } } if (n != 1) res.push_back({n, 1}); return res; } int main() { ios::sync_with_stdio(false); cin.tie(0); int n, h; cin >> n >> h; while (n--) { int a; cin >> a; if (a == 0) { puts("NO"); return 0; } if (a < 0) a = -a; factor2(a); } auto f = factor(h); debug(factor_map, f); for (auto&& [p, ex] : f) { if (factor_map.find(p) == factor_map.end() || factor_map[p] < ex) { puts("NO"); return 0; } } puts("YES"); return 0; }