#include #include #include using namespace std; typedef long long ll; typedef string str; 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; }