Duff is in love with lovely numbers! A positive integer *x* is called lovely if and only if there is no such positive integer *a* &gt; 1 such that *a*<sup class="upper-index">2</sup> is a divisor of *x*.

Malek has a number store! In his store, he has only divisors of positive integer *n* (and he has all of them). As a birthday present, Malek wants to give her a lovely number from his store. He wants this number to be as big as possible.

Malek always had issues in math, so he asked for your help. Please tell him what is the biggest lovely number in his store.
The first and only line of input contains one integer, *n* (1 ≤ *n* ≤ 10<sup class="upper-index">12</sup>).
from functools import reduce
import os
import sys
from collections import *
from decimal import *
from math import *
from bisect import *
from heapq import *
from io import BytesIO, IOBase

input = lambda: sys.stdin.readline().rstrip("\r\n")
def value(): return tuple(map(int, input().split())) # multiple values
def arr(): return [int(i) for i in input().split()] # aay input
def sarr(): return [int(i) for i in input()] #aay from string
def starr(): return [str(x) for x in input().split()] #string aay
def inn(): return int(input()) # integer input
def svalue(): return tuple(map(str, input().split())) #multiple string values
def parr(): return [(value()) for i in range(n)] # aay of pairs
def Ceil(a,b): return a//b+int(a%b>0)
albhabet="abcdefghijklmnopqrstuvwxyz"
mo = 1000000007
inf=1e18
div=998244353
#print("Case #{}:".format(_+1),end=" ")
#print("Case #",z+1,":",sep="",end=" ")
# ----------------------------CODE------------------------------#
def factors(n):         #return list
    return list(set(reduce(list.__add__,
                ([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0))))

l=[]
val=4
diff=5
for _ in range(1000000):
    l.append(val)
    val+=diff
    diff+=2
n=inn()
val=factors(n)
mx=-inf
for i in val:
    flag=0
    if(i!=1):
        for j in l:
            if(i%j==0):
                flag=1
                break
            elif(j>i):
                break
    if(flag==0):
        mx=max(mx,i)
print(mx)










