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 f(n):
    for i in range(2, n):
        if n % i == 0:
            return False
    return True


n = int(input())

A = []
while n > 1:
    for i in range(2, int(n + 1)):
        if (n % i == 0) & (f(i)):
            A.append(i)
            n /= i
A.sort()
el = A[0]
c = 0
res = 1
a = 2
while len(A) != 0:
    if f(a):
        last = A[len(A) - 1]
        res *= a ** (last - 1)
        A.remove(last)
    a += 1

print(res)