#include using namespace std; using ll=long long; constexpr int MOD=998244353; constexpr int sqrtA=100'000; constexpr int MAX_X=5'000'000; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); vector prime(sqrtA,true); for(ll i=2;i>Q; while(Q--){ ll A; cin>>A; int ans=0; for(auto i:primes){ while(A%i==0){ A/=i; ans+=1; } } if(A!=1)ans+=1; cout<<(ans==3?"Yes\n":"No\n"); } }