QOJ.ac

QOJ

حد الوقت: 4.0 s حد الذاكرة: 512 MB مجموع النقاط: 100

#14838. Secret Technique "Astronomical Burial

الإحصائيات

Behold, the light of Gensokyo is right before your eyes! Touhou Eiyashou ~ Imperishable Night.

The secret technique capable of hiding the true moon requires a tremendous amount of energy. Please peer into the secrets of the eternal night from these astronomical numbers.

There are two unknown integers $n, m$ hidden by Eirin. You only know that they satisfy $1 \le m < n \le 10^6$. You are now given the value of $n!/m$. Please find the values of $n$ and $m$. It can be proven that if a solution exists, there will be only one pair of $n, m$.

Input

A single line containing a large integer representing the value of $n!/m$.

Output

Output two integers $n$ and $m$, separated by a space, representing the solution you found.

Examples

Input 1

725760

Output 1

10 5

Input 2

222205274866533696861188663943492144025514210153289574925221342607660952364833132402241580895610757824413566478160056567264726692659200000000000000000000000

Output 2

100 42

Note

To prevent display errors in the problem statement, some line breaks were added to the sample input. The actual input will not contain extra line breaks. $10^6!$ has 5,565,709 digits; please pay attention to the efficiency of your solution.

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.