Sum of cubes
Easy
Execution time limit is 1 second
Runtime memory usage limit is 122.174 megabytes
Write a program that prints all pairs of integers X and Y, such that X ≤ Y and X^3+Y^3=N, where N – given a positive integer.
Input
In the first line of the input file contains one integer N (1 ≤ N < 10^9).
Output
In the output file to bring a pair of numbers X and Y in ascending order of X, each pair on a separate line. For a given number N there exists at least one such pair.
Examples
Input #1
Answer #1
Submissions 4K
Acceptance rate 16%