No.414 衝動
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Show the original
Problem Statement
You are suddenly seized by the impulse to do multiplication. You simply must do multiplication right now.
Find a pair of 2 natural numbers $\{x, y\}$ whose product is exactly $M$. Since $\{1, M\}$ and $\{M, 1\}$ are cheap, you must not use $1$ or $M$.
However, there are cases where no pair of $2$ natural numbers can produce the integer $M$. Only in such cases, use $\{1, M\}$ or $\{M, 1\}$.
Input
$M$
An integer $M$ is given on 1 line. It satisfies $1 \le M \le 10^{12}$.
Note that $M$ may not fit in a 32bit integer type.
Output
Output the $2$ natural numbers on 1 line, separated by a half-width space. There may be multiple solutions, in which case you may output any of them.
Sample
Sample 1
Input
4
Output
2 2
$2 \times 2 = 4$. No other solution exists.
Sample 2
Input
18
Output
6 3
$6 \times 3 = 18$. Besides this, $\{2, 9\}$, $\{3, 6\}$, and $\{9, 2\}$ are also possible, and you may output any of them.
Sample 3
Input
2
Output
1 2
There is no way to make $2$ without using $1$ and $2$, so output either $\{1, 2\}$ or $\{2, 1\}$.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
ei1333333
37zigen