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).
x=int(input())

# 素因数分解
import math 
L=int(math.sqrt(x))

FACT=dict()

for i in range(2,L+2):
    while x%i==0:
        FACT[i]=FACT.get(i,0)+1
        x=x//i

if x!=1:
    FACT[x]=FACT.get(x,0)+1

X=[]
for f in FACT:
    X.append((f,FACT[f]))

X.sort(reverse=True)

ANS=1

now=2

for a,b in X:
    while b:
        ANS*=now**(a-1)
        now+=1
        b-=1

print(ANS)
