#include using namespace std; int main() { // input long long int input, x; cin >> input; x = input; // solve for (long long i = 2; i * i <= x; i++) { //cout << "[for]: " << i << endl; for (int j = 0; j < input; j++) { //cout << "[Next] " << x << " % " << i*i << endl; if ((x % (i * i)) == 0) { x = x / (i * i); //cout << x << endl; } else { break; } } } cout << x << endl; return 0; }