Problem J
Cubes - EXTREME!!!
Input: Standard Input
Output: Standard Output
Given a positive integer N you will have to find two positive integers x and y such that:
The input file contains at most 2500 lines of inputs. Each line contains a positive integer N (0<N≤25*1012). Input is terminated by a line containing a single zero. This line should not be processed.
For each line of input produce one or more lines of output. Each of these lines contains two positive integers x, y separated by a single space, such that. If there is no such integer values of x and y then produce the line “No solution” instead. If there is more than one solution then output the one with smallest value of y.
7 37 12 2299304209293 0 |
2
1 4
3 No
solution 47718
47379 |
Problemsetter: Shahriar Manzoor
Special
Thanks: Derek Kisman