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).
import math
prime = []
lim = 1000
vis = [False for i in range(lim)]
for i in range(2, lim):
  if vis[i] == False:
    prime.append(i)
    for j in range(i, lim, i):
      vis[j] = True


p = []
n = int(input())
for i in prime:
    while n%i == 0:
        n//=i
        p.append(i-1)
    if n == 1:
        break
prod = 1

p.reverse()
for i in range(len(p)):
    prod = prod * pow(prime[i], p[i])
print(prod)