X = int(input()) for i in range(2, int(X ** 0.5) + 1): if X % i == 0: while X % (i * i) == 0: X //= i X //= i print(X)