// #include "pch.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include typedef long long ll; typedef std::pair Pii; typedef std::pair Pll; typedef std::pair Pdd; #define rip(i, n, s) for (int i = (s);i < (int)( n ); i++) #define all(a) a.begin(), a.end() #define MM << " " << template using MaxHeap = std::priority_queue; template using MinHeap = std::priority_queue, std::greater>; template inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } template inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; } # ifndef ONLINE_JUDGE template void vdeb(std::vector &bb) { for (int i = 0;i < bb.size();i++) { if (i == bb.size() - 1) std::cout << bb[i]; else std::cout << bb[i] << ' '; } std::cout << '\n'; } template void vdeb(std::vector> &bb) { for (int i = 0;i < bb.size();i++) { std::cout << i << ' '; vdeb(bb[i]); } std::cout << '\n'; } # endif using namespace std; long long gcd(ll x, ll y){ if(x < y) swap(x,y); while(x%y){ long long tmp = y; y = x%y; x = tmp; } return y; } int main() { int n, h; cin >> n >> h; vector da(n); rip(i,n,0) cin >> da[i]; rip(i,n,0) { if(da[i] == 0) { cout << "NO" << endl; return 0; } da[i] = abs(da[i]); int g = gcd(h, da[i]); h /= g; } if(h == 1) cout << "YES" << endl; else cout << "NO" << endl; }