#K62492. Parking Sections
Parking Sections
Parking Sections
Given a perfect square number \(n\), find two positive integers \(l\) and \(w\) such that \(n = l \times w\). Among all valid pairs, output the pair where the two numbers are as close as possible, i.e. the pair with the maximum possible \(l\) (with the condition \(l \le w\)). If no such pair exists, output "impossible".
Examples:
- If the input is 36, a valid output is: 6 6
- If the input is 49, a valid output is: 7 7
- If the input is 1, the output should be: 1 1
inputFormat
Input is provided from standard input (stdin) as a single integer (n), where (n) is guaranteed to be a perfect square.
outputFormat
Output two integers (l) and (w) separated by a space on a single line, such that (l \times w = n) and the numbers are as close as possible. If no valid pair exists, output "impossible".## sample
36
6 6