Mistrzostwa Polski Szkół Średnich w Programowaniu Zespołowym 2024

2020-2022 2023 Regulations Schedule RODO info Ranking

Problem description


Divisors, inversed
(dzielniki-na-odwrot)
Memory limit: 32 MB
Time limit: 0.50 s

Write a program, which reads a positive integer N and finds the smallest positive integer M having exactly M divisors and writes the result to standard output.

Input

In the first (and the only one) line of the standard input there is one positive integer N.

Output

In the first (and the only one) line of the standard output there should be one positive integer M – the smallest positive integer having exactly N divisors. If M > 1017, NIE (the Polish for NO) should be printed.

Limits

1 ≤ N ≤ 100 000.

Example

Input Output
4
6