using System;
using System.IO;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using System.Numerics;

namespace abc166
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.SetOut(new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false });
            if (File.Exists("input.txt"))
            {
                Console.SetIn(new StreamReader("input.txt"));
            }
			solve_abc166D();
			Console.Out.Flush();

        }

        public static void solve_abc166D()
        {
            long x = Convert.ToInt64(Console.ReadLine());
            bool ok = false;
            int a = 0;
            int b = 0;
            for (int i = -200; i <= 200; i++)
            {
                for (int j = -200; j <= 200; j++)
                {
                    if ((long)Math.Pow(i, 5) - (long)Math.Pow(j, 5) == x)
                    {
                        a = i;
                        b = j;
                        ok = true;
                        break;
                    }
                }
                if (ok)
                {
                    break;
                }
            }
            Console.WriteLine("{0} {1}", a, b);
        }

        public static void solve_abc166C()
        {
            int[] nm = Array.ConvertAll(Console.ReadLine().Split(), int.Parse);
            int n = nm[0];
            int m = nm[1];
            int[] h = Array.ConvertAll(Console.ReadLine().Split(), int.Parse);
            Dictionary<int, int> g = new Dictionary<int, int>();
            for (int i = 1; i <= n; i++)
            {
                g.Add(i, 0);
            }
            int cnt = 0;
            while (m-- > 0)
            {
                int[] ab = Array.ConvertAll(Console.ReadLine().Split(), int.Parse);
                if (h[ab[0] - 1] > h[ab[1] - 1])
                {
                    if (g[ab[0]] >= 0)
                    {
                        g[ab[0]]++;
                    }
                    g[ab[1]] = -1;
                }
                else if (h[ab[1] - 1] > h[ab[0] - 1])
                {
                    if (g[ab[1]] >= 0)
                    {
                        g[ab[1]]++;
                    }
                    g[ab[0]] = -1;
                }
                else
                {
                    g[ab[0]] = -1;
                    g[ab[1]] = -1;
                }
            }
            foreach (var item in g)
            {
                if (item.Value >= 0)
                {
                    cnt++;
                }
            }
            Console.WriteLine(cnt);
        }

        public static void solve_abc166B()
        {
            int[] nk = Array.ConvertAll(Console.ReadLine().Split(), int.Parse);
            int n = nk[0];
            int k = nk[1];
            int[] cnt = new int[n];
            while (k-- > 0)
            {
                int d = Convert.ToInt32(Console.ReadLine());
                int[] a = Array.ConvertAll(Console.ReadLine().Split(), int.Parse);
                for (int i = 0; i < d; i++)
                {
                    cnt[a[i] - 1]++; 
                }
            }
            int sum = 0;
            for (int i = 0; i < cnt.Length; i++)
            {
                if (cnt[i] == 0)
                {
                    sum++;
                }
            }
            Console.WriteLine(sum);
        }

        public static void solve_abc166A()
        {
            string s = Console.ReadLine();
            if (s == "ABC")
            {
                Console.WriteLine("ARC");
            }
            else
            {
                Console.WriteLine("ABC");
            }
        }
    }
}


Measured memory_bytes: 28696