#include using namespace std; using ll = long long; templatebool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (b factorize(ll n){ map mp; ll sq = sqrt(n); FOR(i, 2, sq+1){ while(n%i==0){ mp[i]++; n/=i; } } // 残り if(n!=1){ mp[n]++; } return mp; } int main(){ cin.tie(0); ios::sync_with_stdio(false); // input ll X; cin >> X; auto mp = factorize(X); ll ans = 1; for(auto pa : mp){ ll v = pa.first; ll count = pa.second; if(count%2==1){ ans *= v; } } p(ans); return 0; }