#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; long long MOD = 1000000007; long long A[1000000] = {0}; int main() { long long X; cin >> X; long long x = X; for ( long long i = 2; i*i <= x; i++ ) { int j = 0; while ( X%i == 0 ) { X /= i; j++; } A[i] = j; if ( X == 1 ) { break; } } if ( X != 1 ) { A[X] = 1; } long long ans = 1; for ( long long i = 2; i <= 1000000; i++ ) { // if ( A[i] ) { cout << i << " " << A[i] << endl; } if ( A[i]%2 ) { ans *= i; } } cout << ans << endl; return 0; }