#include #include #include #include #include #include using namespace std; typedef long long ll; typedef long double ld; typedef string str; #define ALL(x) (x).begin(),(x).end() #define RALL(x) (x).rbegin(),(x).rend() #define MAX_LL (1LL<<62) ll max(ll &a, ll &b) {if(a>b) return a; else return b;} ll min(ll &a, ll &b) {if(ab){a=b; return true;} else return false;} bool update_min(ld &a, const ld &b) {if(a>b){a=b; return true;} else return false;} vector calc_primes(const ll max_num) { if(max_num < 2) return {}; vector data = {2}; for(ll num = 3; num <= max_num; num += 2){ for(ll p : data){ if(num % p == 0) break; else if (p * p > num){ data.push_back(num); break; } } } return data; } int main() { ll Q; cin >> Q; vector A(Q); for(ll i=0; i> A[i]; } const ll N_MAX = 10000000000; vector primes = calc_primes(pow(N_MAX, 0.5)); ll counter = 0; ll num; for(ll j=0; j 3) goto label_break; } } if(num != 1) counter++; label_break: if(counter == 3) cout << "Yes" << endl; else cout << "No" << endl; } return 0; }