Given the number *n*, find the smallest positive integer which has exactly *n* divisors. It is guaranteed that for the given *n* the answer will not exceed 10<sup class="upper-index">18</sup>.
The first line of the input contains integer *n* (1 ≤ *n* ≤ 1000).
def prime(x):
    for i in range(2,x):
        if(x%i==0):
            return False
    return True

n=int(input())

L=[]

for i in range(2,n+1):
    if(n%i==0 and prime(i)):
        x=n
        while(x%i==0):
            x//=i
            L.append(i)

L.sort(reverse=True)
p=[2,3,5,7,11,13,17,19,23,29,31]

ans=1

for i in range(len(L)):
    ans*=p[i]**(L[i]-1)
print(ans)
