#define _GLIBCXX_DEBUG #include #include #include using namespace atcoder; using namespace std; typedef long long ll; #define rep(i,a,b) for(int i=a;i; using vvi = vector; using li =vector; using lli=vector
  • ; using si =vector; using ssi =vector; const long long INF = 1e18; const long long MOD=1e9+7; int main() { int q; cin>>q; while(q--){ ll a;cin>>a;ll cnt=0; for(ll i=2;i*i<=a;i++){ if(cnt>3)break; if(a%i==0){a/=i;cnt++;} while(a%i==0){ a/=i; cnt++; } } if(a>1)cnt++; if(cnt==3)cout<<"Yes"<