Problem:
Score : 400 points

Problem Statement

Give a pair of integers (A, B) such that A^5-B^5 = X.
It is guaranteed that there exists such a pair for the given integer X.

Constraints

1 \leq X \leq 10^9

X is an integer.

There exists a pair of integers (A, B) satisfying the condition in Problem Statement.

Input

Input is given from Standard Input in the following format:

X

Output

Print A and B, with space in between.
If there are multiple pairs of integers (A, B) satisfying the condition, you may print any of them.

A B

Sample Input 1

33

Sample Output 1

2 -1

For A=2 and B=-1, A^5-B^5 = 33.

Sample Input 2

1

Sample Output 2

0 -1

Solution in C# (.NET Core 3.1.201) (judge verdict: Wrong Answer)

using System;
using static System.Console;
using static System.Math;
using System.Numerics;
using System.Collections.Generic;
using System.Linq;


public class Program
{
    public static void Main(string[] args)
    {
        bool end = false;
        long a = myRead.readLong();
        string ans = "";
        for (int i = -120; i < 120; i++)
        {
            long A = MyMath.Pow(i, 5);
            for (int j = -120; j < 120; j++)
            {
                long B = MyMath.Pow(j, 5);
                if (A - B == a)
                {
                    ans += A + " " + B;
                    end = true;
                    break;
                }
            }
            if (end == true)
                break;
        }
        WriteLine(ans);
        Out.Flush();
    }
}
public static class myRead
{
    public static int readInt() { return int.Parse(ReadLine()); }
    public static long readLong() { return long.Parse(ReadLine()); }
    public static string reatStr() { return ReadLine(); }
    public static int[] readIntArray() { return ReadLine().Split(' ').Select(int.Parse).ToArray(); }
    public static long[] readLongArray() { return ReadLine().Split(' ').Select(long.Parse).ToArray(); }
    public static string[] readStrArray() { return ReadLine().Split(' '); }
}


public static class MyMath
{
    public static long Factorical(long n)
    { return n <= 1 ? 1L : n * Factorical(n - 1); }
    public static long Permutation(long n, long m)
    { return m == 0 ? 1L : (m == n) ? Permutation(n, m - 1) : n * Permutation(n - 1, m - 1); }
    public static long Combination(long n, long m)
    { return n - m > m ? Permutation(n, m) / Factorical(m) : Permutation(n, n - m) / Factorical(n - m); }
    public static long Gcd(long n, long m)
    { return n % m == 0 ? m : Gcd(m, n % m); }
    public static long Lcm(long n, long m)
    { return n * m / Gcd(n, m); }
    public static long Pow(long n, long m)
    { return m == 0 ? 1L : m == 1 ? n : n * Pow(n, m - 1); }
}