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# (Mono-mcs 6.8.0.105) (judge verdict: Wrong Answer)

using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;

namespace ABC166
{
    public class Solve
    {
        public static void Main(string[] args)
        {
            new ABC_D();
        }
    }
    public class ABC_A
    {
        public ABC_A()
        {
            var s = Ex.Read;

            var str = s == "ABC" ? "ARC" : "ABC";
            str.Cw();
        }
    }
    public class ABC_B
    {
        public ABC_B()
        {
            var l = Ex.ReadIntArray();
            // N 人のすぬけ君  K 種類のお菓子
            var n = (int)l[0];
            var k = (int)l[1];

            // お菓子を1つも持っていない
            bool[] ans = new bool[n];

            for (int i = 0; i < k; i++)
            {
                var ii = Ex.ReadInt;
                var l2 = Ex.ReadIntArray();
                foreach (var v in l2) ans[v - 1] = true;
            }
            ans.Where(v => !v).Count().Cw();
        }
    }
    public class ABC_C
    {
        public ABC_C()
        {
            var l = Ex.ReadLongArray();
            // N 個の展望台があり、展望台 i の標高は H i です。  M 本の道
            // 道jは展望台Ajと展望台Bjを結んでいます
            var n = l[0];
            var m = l[1];

            var h = Ex.ReadLongArray();

            //展望台 i から一本の道を使って辿り着ける どの展望台よりも展望台 i の方が標高が高い
            //展望台 i から一本の道を使って辿り着ける 展望台が存在しない場合
            bool[] ans = new bool[n];

            for (int i = 0; i < m; i++)
            {
                var lm = Ex.ReadLongArray();
                var a = lm[0] - 1;
                var b = lm[1] - 1;
                if (h[a] <= h[b]) ans[a] = true;
                if (h[a] >= h[b]) ans[b] = true;
            }
            ans.Where(v => !v).Count().Cw();
        }
    }
    public class ABC_D
    {
        long x;
        public ABC_D()
        {
            x = Ex.ReadLong;
            if (0 == x)
            {
                $"0 0".Cw();
                return;
            }

            long[] arr = new long[90];

            //for (long i = 0; true; i++)
            //{
            //    if (i * i * i * i * i > 2 * 1000000000)
            //    {
            //        i.Cw();
            //        break;
            //    }
            //}
            for (long i = 0; i < 90; i++)
            {
                arr[i] = i * i * i * i * i;
                if (arr[i] == x)
                {
                    $"0 -{i}".Cw();
                    return;
                }
            }
            for (long j = 0; j < 90; j++)
            {
                for (long k = j; (arr[j] + arr[k]) <= x && k < 88; k++)
                {
                    //$"{j} -{k}".Cw();
                    if (arr[j] + arr[k] == x)
                    {
                        $"{j} -{k}".Cw();
                        return;
                    }
                }
                for (long k = j; k > 0 && (arr[j] - arr[k]) <= x; k--)
                {
                    // $"{j} {k}".Cw();
                    if (arr[j] - arr[k] == x)
                    {
                        $"{j} {k}".Cw();
                        return;
                    }
                }
            }
        }
    }
    public class ABC_E
    {
        public ABC_E()
        {
        }
    }
    public class ABC_F
    {
        public ABC_F()
        {
        }
    }
    public static class Ex
    {
        public static void Cw(this object s) { Console.WriteLine(s); }

        public static List<string> FastSort(this List<string> s) { s.Sort(StringComparer.Ordinal); return s.ToList(); }
        public static string yesno(this bool b) { return b ? "yes" : "no"; }
        public static string YesNo(this bool b) { return b ? "Yes" : "No"; }
        public static string YESNO(this bool b) { return b ? "YES" : "NO"; }

        public static string Read { get { return Console.ReadLine().Trim(); } }
        public static int ReadInt { get { return int.Parse(Read); } }
        public static long ReadLong { get { return long.Parse(Read); } }
        public static double ReadDouble { get { return double.Parse(Read); } }
        public static string[] ReadArray() { return Read.Split(' '); }
        public static int[] ReadIntArray() { return Read.Split(' ').Select(int.Parse).ToArray(); }
        public static long[] ReadLongArray() { return Read.Split(' ').Select(long.Parse).ToArray(); }
        public static string[] ReadArray(long N) { var ret = new string[N]; for (long i = 0; i < N; ++i) ret[i] = Read; return ret; }
        public static int[] ReadIntArray(long N) { var ret = new int[N]; for (long i = 0; i < N; ++i) ret[i] = ReadInt; return ret; }
        public static long[] ReadLongArray(long N) { var ret = new long[N]; for (long i = 0; i < N; ++i) ret[i] = ReadLong; return ret; }
    }
}