#000189

z-shortest

Mr. Little Z got tired of writing long problem text, so he decided to give you a problem with the shortest text possible:

For given positive integer n find two positive integers a and b such that a^b = n. If there are multiple solutions, give the one with the smallest value of a.



InputFrom the first line of the standard input read one integer k, (1 <= k <= 1000000), k represents the number of digits of n. From the second line read k characters that represent the number n. n will be greater than 1.


OutputTo the standard output, in one line, write two integers a and b


Input:
2
10

Output:
10 1


Input:
2
16

Output:
2 4


Input:
2
27

Output:
3 3

Submit solution

Coming later

The grading service will be connected in a later migration step. You can inspect the task and your previous results now.