#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 m = 0; ll h = H; for(ll i=2;i*i<=H;i++){ while(h%i==0){ h /= i; cntH[i]++; } } if(h>1)cntH[h]++; FOR(j,0,N){ cin >> H; h = H; if(H==0){ cout << "YES" << endl; return 0; } if(H < 0){ m++; H = -H; } for(ll i=2;i*i<=H;i++){ while(h%i==0){ h /= i; cntA[i]++; } } if(h>1)cntA[h]++; } bool ok = m%2==0; for(auto x:cntH){ if(x.second > cntA[x.first]){ ok = false; } //cout << x.first << " " << x.second << endl; } cout << (ok?"YES":"NO") << endl; }