#include #include #include #include #include #include using namespace std; typedef long long ll; #define SORT(x) sort((x).begin(), (x).end()) #define RSORT(x) sort((x).begin(), (x).end(), greater() ) int isPrime(int x) { if (x == 2) return 1; if (x < 2 || x % 2 == 0) return 0; for (int i = 3; i * i <= x; i++) { if (x % i == 0) { return 0; } } return 1; } int main() { ll x, y = 1; cin >> x; for (int i = 0; i <= x; i++) { if (isPrime(i)) { int cnt = 0; while (x % i == 0) { x /= i; cnt++; } if (cnt > 0 && cnt % 2 == 1) y *= i; } } cout << y << endl; return 0; }