#include using namespace std; typedef long long ll; #define FOR(I,A,B) for(int I = int(A); I < int(B); ++I) #define FORR(I,A,B) for(ll I = ll((B)-1); I >= ll(A); --I) const ll MOD=1000000007LL; #define out(a) cout<> N >> H; map cntH,cntA; ll h = H; for(ll i=2;i*i<=H;i++){ while(h%i==0){ h /= i; cntH[i]++; } } cntH[h]++; FOR(j,0,N){ cin >> H; h = H; for(ll i=2;i*i<=H;i++){ while(h%i==0){ h /= i; cntA[i]++; } } cntA[h]++; } bool ok = true; for(auto x:cntH){ if(x.second > cntA[x.first]){ ok = false; } } cout << (ok?"YES":"NO") << endl; }