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).
from functools import reduce
from operator import mul
primes = [2,3,5,7,11,13,17,19,23,29,31,37]
s, c = int(input()), []

for p in range(2, s):
	while s % p == 0:
		c.append(p)
		s //= p
	if p*p > s:
		if s > 1: c.append(s)
		break
print(sorted(c))

print(reduce(lambda p, e: p*e[0]**(e[1]-1), zip(primes, sorted(c, reverse=True)), 1))