#include using namespace std; typedef long long ll; typedef vector vi; typedef vector vl; typedef pair pii; typedef pair pll; #define REP(i,a,b) for(ll i=(a);i<(b);++i) #define REPREV(i,a,b) for(ll i=(b)-1;i>=(a);--i) #define DEBUG(x) cout<<#x<<": "< P; int main(){ ll n; cin>>n; ll tmax = n-1; ll tmin = n-1; vl yaku; for(ll i=1;i*i<=n;i++){ if(n%i==0){ yaku.push_back(i); if(n/i!=i)yaku.push_back(i); } } sort(ALL(yaku)); int x = yaku.size(); for(int i=0;i=n)break; if((n/a)%b!=0)continue; ll c = n/a/b; if(c