atcoder#ABC284D. [ABC284D] Happy New Year 2023
[ABC284D] Happy New Year 2023
Score : points
Problem Statement
You are given a positive integer . It is known that can be represented as using two different prime numbers and .
Find and .
You have test cases to solve.
Constraints
- All values in the input are integers.
- can be represented as using two different prime numbers and .
Input
The input is given from Standard Input in the following format, where represents the -th test case:
Each test case is in the following format:
Output
Print lines.
The -th line should contain and for the -th test case, separated by a space. Under the constraints of this problem, it can be proved that the pair of prime numbers and such that is unique.
3
2023
63
1059872604593911
17 7
3 7
104149 97711
For the first test case, we have . Thus, and .