#include using namespace std; typedef long long ll; typedef long double ld; typedef pair P; typedef pair Pi; #define rep(i,n) for(ll i=0;i inline bool chmax(T &a, T b){if(a inline bool chmin(T &a, T b){if(a>b){a=b;return true;}return false;} template ostream& operator<<(ostream& s,const complex& d) {return s<<"("< ostream& operator<<(ostream& s,const pair& d) {return s<<"("< ostream& operator<<(ostream& s, const vector& d){int len=d.size();rep(i,len){s< ostream& operator<<(ostream& s,const vector>& d){int len=d.size();rep(i,len){s< ostream& operator<<(ostream& s,const set& v){s<<"{ ";for(auto itr=v.begin();itr!=v.end();++itr) {if (itr!=v.begin()) {s<< ", ";}s<<(*itr);}s<<" }";return s;} template ostream& operator<<(ostream& s,const multiset& v){s<<"{ ";for(auto itr=v.begin();itr!=v.end();++itr) {if (itr!=v.begin()) {s<< ", ";}s<<(*itr);}s<<" }";return s;} template ostream& operator<<(ostream& s,const map& m){s<<"{"< vector divisor(T x){ vector res; for(T i=1;i*i<=x;i++){ if(x%i==0){ res.push_back(i); if(i!=x/i){ res.push_back(x/i); } } } return res; } int main(){ cin.tie(0);ios::sync_with_stdio(false); ll n; cin>>n; vector ret=divisor(n); ll ans1=inf,ans2=inf; for(auto &b:ret){ ll a=n/b,x; bool flag=false; FOR(i,1,1e4){ if(a==i*i){ x=i; flag=true; break; } } if(flag){ if(chmin(ans2,b)){ ans1=x; } } } cout<