问题2378--Factors

2378: Factors

时间限制: 2 Sec  内存限制: 128 MB
提交: 1  解决: 1
[提交] [状态] [讨论版] [命题人:]

题目描述

The fundamental theorem of arithmetic states that every integer greater than 1 can be uniquely represented as a product of one or more primes. While unique, several arrangements of the prime factors may be possible. For example:


Let (k) be the number of different arrangements of the prime factors of k. So (10) = 2 and (20) = 3. Given a positive number n, there always exists at least one number k such that (k) = n. We want to know the smallest such k.



输入

The input consists of at most 1000 test cases, each on a separate line. Each test case is a positive integer n<263.


输出

For each test case, display its number n and the smallest number >1 such that (k) = n. The numbers in the input are chosen such that k<263.


样例输入

1
2
3
105

样例输出

1 2
2 6
3 12
105 720

来源/分类

 

[提交] [状态]