#include using namespace std; using ll = long long; bool chmin(map, ll>& M, pair P, ll x) { if (!M.count(P)) { M[P] = x; return 1; } else if (M[P] > x) { M[P] = x; return 1; } return 0; } bool is_p(string S){ if(S=="")return 1; string T=S; reverse(T.begin(),T.end()); return S==T; } int main() { cin.tie(nullptr); ios::sync_with_stdio(false); vector P(1e5+1,1); vector PP; P[0]=P[1]=0; for(int i=0;i<1e5+1;i++)if(P[i]){ PP.push_back(i); for(int j=i*2;j<=1e5;j+=i){ P[j]=0; } } int q; cin>>q; for(int i=0;i>a; int cnt=0; for(auto p:PP){ while(a%p==0){ a/=p; cnt++; if(cnt>3)break; } if(cnt>3)break; } if(a!=1)cnt++; cout<<(cnt==3?"Yes":"No")<