#include using namespace std; using Int = long long; template inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template inline void chmax(T1 &a,T2 b){if(a map factorize(T x){ map res; for(Int i=2;i*i<=x;i++){ while(x%i==0){ x/=i; res[i]++; } } if(x!=1) res[x]++; return res; } //INSERT ABOVE HERE signed main(){ Int n; cin>>n; auto m=factorize(n); using P = pair; vector

v; for(auto p:m) v.emplace_back(p); Int mi=n,ma=0; function dfs= [&](Int a,Int x,Int y,Int z){ if(a==(Int)v.size()){ chmin(mi,x-1+y-1+z-1); chmax(ma,x-1+y-1+z-1); return; } Int s=v[a].first,t=v[a].second; vector po(t+1,1); for(Int i=0;i