#include using namespace std; #define ALL(x) (x).begin(), (x).end() #define REP(i, n) for(ll i=0; i<(ll)(n); i++) template bool chmax(T& a, T b) { return a bool chmin(T& a, T b) { return a>b ? a=b, true : false; } using ll=long long; const int INF=1e9+10; const ll INFL=4e18; using VI=vector; using VVI=vector; using VL=vector; using VVL=vector; using PL=pair; using VP=vector; using WG=vector>>; #ifdef LOCAL #include "./debug.hpp" #else #define debug(...) #define print_line #endif //---------------------------------------------------------- void solve() { int Q; cin>>Q; map mp; for(ll t=1; t<=1e6; t++) { chmax(mp[t*t],2); if(t<=1e4) chmax(mp[t*t*t],3); if(t<=1e3) chmax(mp[t*t*t*t],4), chmax(mp[t*t*t*t*t],5); if(t<=1e2) chmax(mp[t*t*t*t*t*t],6); } for(ll a=2; a<=100; a++) { ll tmp=1; int c=0; while(tmp*a<=1e12) { tmp*=a; c++; chmax(mp[tmp],c); } } while(Q--) { ll N; cin>>N; if(mp.count(N)) cout<>T; while(T--) solve(); }