#define _USE_MATH_DEFINES #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include//assert(); //#include //xAOJ ///////// #define REP(i, x, n) for(int i = x; i < n; i++) #define rep(i,n) REP(i,0,n) #define P(p) cout<<(p)< ///////// typedef long long LL; typedef long double LD; typedef unsigned long long ULL; ///////// using namespace::std; ///////// ///////// void solve(){ LL X; cin >> X; int count = 0; int ret = 1; bool flag = false; for(int i=2;X!=1 && i<=1000000;++i){ count = 0; while( X % i == 0 ){ X = X/i; ++count; } if( count ){ flag = true; } if( count % 2 != 0){ ret *= i; } } if( flag ){ cout << ret << endl; }else{//Xが素数 cout << X << endl; } } int main(void){ std::cin.tie(0); std::ios::sync_with_stdio(false); std::cout << std::fixed;// cout << setprecision(16);// //cpp solve(); return 0; }