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 (Python):
import sys
X=int(input())







for A in range(-200,200):
    for B in range(-200,200):
        if A**5-B**5==X:
            print(A,B)
            sys.exit()

Solution (Python):
x = int(input())
for a in range(-200,201):
    for b in range(-200,201):
        if(a**5 - b**5 == x):
            print(' '.join(map(str,[a,b])))
            exit()

Solution (Python):
X = int(input())
for a in range(201):
    for b in range(-200, 201):
        if a**5 - b**5 == X:
            print(a, b)
            exit()

Solution (Python):
import math
from functools import reduce
from collections import deque
import sys
sys.setrecursionlimit(10**7)

def input():
    return sys.stdin.readline().strip()


def get_nums_l():
    return [ int(s) for s in input().split(" ")]


def get_nums_n(n):
    return [ int(input()) for _ in range(n)]


def get_all_int():
    return map(int, open(0).read().split())

def rangeI(it, l, r):
    for i, e in enumerate(it):
        if l <= i < r:
            yield e
        elif l >= r:
            break

def log(*args):
    print("DEBUG:", *args, file=sys.stderr)

INF = 999999999999999999999999
MOD = 10**9+7

x = int(input())

y = int(x**(1/3))

for a in range(-y, y+1):
    for b in range(-y, y+1):
        if a**5 - b**5 == x:
            print(a, b)
            exit()

Solution (Python):
x=input()
a=[0]
d={}
d[0]=0
for i in range(1,1000):
	a+=[i**5]
	a+=[-i**5]
	d[i**5]=i
	d[-i**5]=-i

a.sort()
for i in range(len(a)):
    if x+a[i] in a:
        print d[a[i]+x],d[a[i]]
        break

Solution (Python):
X=int(input())
flag=False
for i in range(-1000,1000):
    for j in range(-1000,1000):
        if(i**5-j**5==X):
            flag=True
            break
    if(flag):
        break
print(i,j)

Solution (Python):
import sys
stdin = sys.stdin
sys.setrecursionlimit(10**6)
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

x = ni()

for a in range(-200,201):
    for b in range(-200,201):
        if a**5-b**5 == x:
            print(a,b)
            exit()

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
     
def main():
    powers5 = dict()
    for i in range(-200, 200):
        powers5[i] = math.pow(i, 5)
    x = I()
    for i_key in powers5.keys():
        for j_key in powers5.keys():
            if powers5[i_key] - powers5[j_key] == x:
                print(i_key, j_key)
                return

main()

Solution (Python):
X = int(input())
for a in range(-201,201):
  for b in range(-201,201):
    if a**5 - b**5 == X:
      print(a,b)
      quit()

Solution (Python):

n = int(input())
for a in range(-200, 201):
    for b in range(-200, 201):
        if a ** 5 - b ** 5 == n:
            print(a, b)
            exit()

Solution (Python):
x=input()
a=[0]
d={}
d[0]=0
for i in range(1,1000):
	a+=[i**5]
	a+=[-i**5]
	d[i**5]=i
	d[-i**5]=-i

a.sort()
for i in range(len(a)):
    if x+a[i] in a:
        print d[a[i]+x],d[a[i]]
        break

Solution (Python):
x = int(input())
for a in range(201):
    for b in range(-201,201):
        if a**5 - b**5 == x:
            print(a,b)
            exit()

Solution (Python):

n = int(input())

ans = -1
for ii in range(2001):
    i = ii-1000
    for jj in range(2001):
        j = jj-1000
        if(i*i*i*i*i - j*j*j*j*j == n):
            print(i,j)
            exit()

Solution (Python):
import sys
x = int(input())
for i in range(-500, 500):
    for j in range(-500, 500):
        if i**5 - j**5 == x:
            print(i, j)
            sys.exit()

Solution (Python):
x = int(input())

for a in range(1000):
    b = a-1
    while 1:
        if a**5-b**5==x:
            print(a,b)
            exit()
        elif a**5-b**5>x:
            break
        else:
            b-=1

Solution (Python):
FAST_IO = 0
if FAST_IO:
    import io, sys, atexit
    rr = iter(sys.stdin.read().splitlines()).next
    sys.stdout = _OUTPUT_BUFFER = io.BytesIO()
    @atexit.register
    def write():
        sys.__stdout__.write(_OUTPUT_BUFFER.getvalue())
else:
    rr = raw_input
rri = lambda: int(rr())
rrm = lambda: map(int, rr().split())



def solve(X):
    
    
    for bb in xrange(1000):
        for b in (-bb, bb):
            target = X + b ** 5
            sign = 1 if target >= 0 else -1
            target = abs(target)
            a = int(target**0.2)
            if a ** 5 == target:
                return a * sign, b
            if (a+1)**5 == target:
                return a * sign, b
    
print "{} {}".format(*solve(rri()))

Solution (Python):
import sys
X=int(input())
q=int(X**0.25)+1
for i in range(1,q):
  for j in range(-q,q):
    if i**5-j**5 ==X:
      print(i,j)
      sys.exit()

Solution (Python):
x = int(input())
for i in range(200):
    for j in range(i+1):
        if i**5 - j**5 ==x:
            print(i,j)
        elif i**5 + j**5 ==x:
            print(i,-j)

Solution (Python):
X = int(input())
N = [i**5 for i in range(1000)]

for i in range(1000):
	for j in range(i, 1000):
		if N[j] - N[i] == X:
			print(j, i)
			exit()
		if N[j] + N[i] == X:
			print(j, -i)
			exit()

Solution (Python):
import bisect
import os

import sys

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7



X = int(sys.stdin.buffer.readline())

hist = []
for a in range(100000):
    hist.append(a ** 5)
    i = bisect.bisect_left(hist, a ** 5 - X)
    if i < len(hist) and hist[i] == a ** 5 - X:
        print(a, i)
        break
    i = bisect.bisect_left(hist, X - a ** 5)
    if i < len(hist) and hist[i] == X - a ** 5:
        print(a, -i)
        break

Solution (Python):
x = int(input())
for a in range(0, 200):
    for b in range(-200, 200):
        if (a ** 5) - (b ** 5) == x:
            print(a, b)
            exit()

Solution (Python):
X = int(input())
ans = []

for a in range(-200, 201):
    A = a**5
    for b in range(-200, 201):
        B = b**5
        if A-B == X:
            ans.append([a, b])
            break
    if len(ans) > 0:
        break
print(*ans[0])

Solution (Python):
X = int(input())
choices = [(i, i ** 5) for i in range(-1000, 1001)]
for ai, a in choices:
	for bi, b in choices:
		if a - b == X:
			print(ai, bi)
			raise SystemExit

Solution (Python):
n = int(input())
for i in range(-500,500):
    for j in range(-500,500):
        if (j**5 - i**5) == n:
            a = j
            b = i
            break
            break
print(str(a)+" "+str(b))

Solution (Python):
x = int(input())
num_lst = [i for i in range(-120, 121)]
flag = False
for i in num_lst:
    for j in num_lst:
        if i ** 5 - j ** 5 == x:
            print(i, j)
            flag = True
            break
    if flag:
        break

Solution (Python):
x = int(input())

for i in range(-200, 200):
    for j in range(i, 200):
        if (j**5) - (i**5) == x:
            print(j, i)
            exit()

Solution (Python):


import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

x = I()
for i in range(-1000, 1000):
    for j in range(-1000, 1000):
        if i**5 - j**5 == x:
            print(i,j)
            quit()

Solution (Python):
X = int(input())

for A in range(-1000, 1000):
  t = A**5-X
  if t>=0:
    t = int(t**0.2)
  else:
    t = int(-(-t)**0.2)
  for B in range(t-1, t+2):
    if A**5-B**5==X:
      print(A, B)
      exit(0)

Solution (Python):
import sys
import math
input = sys.stdin.readline

x = int(input())
k = 200

def main():
    for a in range(-k, k):
        for b in range(-k, k):
            if a**5 - b**5 == x:
                print(a, b)
                return
    return 1/0

if __name__ == '__main__':
    main()

Solution (Python):
X = int(input())
for A in range(-300, 300):
    B5 = A**5-X
    for B in range(-300, 300):
        if B**5 == B5:
            print(A, B)
            exit()

Solution (Python):
import sys
x = int(input())
for a in range(0, 300):
    for b in range(-300, 300):
        if a ** 5 - b ** 5 == x:
            print(a, b)
            sys.exit()

Solution (Python):
X = int(input())
c = 0
for A in range(10**3+1):
  if c == 1:
    break
  for B in range(-10**3,10**3+1):
    if A**5-B**5 == X:
      print(A,B)
      c = 1
      break

Solution (Python):
x = int(input())
rep = 10**3
for i in range(rep):
    for j in range(rep):
        if (i-(rep//2))**5-(j-(rep//2))**5 == x:
            print(i-(rep//2),j-(rep//2))
            exit()

Solution (Python):
x = int(input())
for a in range(1000):
    for b in range(1000):
        if a ** 5 + b ** 5 == x:
            print('{} {}'.format(a, -b))
            exit()
        elif a ** 5 - b ** 5 == x:
            print('{} {}'.format(a, b))
            exit()

Solution (Python):
x = int(input())
fl = False
for a in range(-200,200):
    for b in range(-200,200):
        if a ** 5 - b ** 5 == x:
            print(a,b)
            fl = True
        if fl:
            break
    if fl:
        break

Solution (Python):
X = int(input())

n5 = {}
for i in range(100000):
    n5[i**5] = i    

for i in range(-1000000, 1000000):
    b = i ** 5 + X
    if b in n5:
        print(n5[b], i)
        break

Solution (Python):
def main():
    X = int(input())

    for a in range(-200, 201):
        for b in range(-200, 201):
            if pow(a, 5) - pow(b, 5) == X:
                print(a, b)
                return


if __name__ == '__main__':
    main()

Solution (Python):
x = int(input())
eps = 10**-10

B = [0]
for i in range(10**5):
    B.append(i)
    B.append(-i)

for b in B:
    if x + b**5 >= 0:
        c = (x + b**5) ** 0.2
        if abs(c - int(c)) < eps:
            print(int(c), b)
            break
        elif abs(c - (int(c)+1)) < eps:
            print(int(c)+1, b)
            break

Solution (Python):
import sys
input = sys.stdin.readline

X = int(input())


for B in range(10**3):
    for A in range(B+1, 10**14):
        t = A**5 - B**5
        if t > X:
            break
        elif t == X:
            a1, a2 = A, B
            break

for B in range(10**3):
    for A in range(10**3):
        t = A**5 + B**5
        if t > X:
            break
        elif t == X:
            a1, a2 = A, -B
            break

print(a1, a2)

Solution (Python):
X = int(input())

for a in range(-1000, 1001):
    A = a ** 5
    for b in range(-1000, 1000):
        B = b ** 5
        if A - B == X:
            print(a, b)
            exit()
print(-1, -1)

Solution (Python):
"""

Wolfram Alpha

(A^5 - B^5)/(A - B) = A^4 + A^3 B + A^2 B^2 + A B^3 + B^4

"""

import sys

X = int(sys.stdin.readline().rstrip())

a = 0
while True:
	b = a
	target = (a**5) - X
	while (b**5) > target:
		b -= 1
	if (b**5) == target:
		print("%d %d" % (a, b))
		sys.exit(0)
	a += 1

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, acos, atan, asin, log, log10, gcd
from itertools import permutations, combinations, product, accumulate, combinations_with_replacement
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits

def debug(*args):
    if debugmode:
        print(*args)
def input(): return sys.stdin.readline().strip()
def STR(): return input()
def INT(): return int(input())
def FLOAT(): return float(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 9)
inf = sys.maxsize
mod = 10 ** 9 + 7
dx = [0, 1, 0, -1, 1, -1, -1, 1]
dy = [1, 0, -1, 0, 1, -1, 1, -1]
debugmode = True


def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append([i, n // i])
    return divisors

x = INT()
arr = make_divisors(x)
for i, j in arr:
    for a in range(-1000, 1000):
        b = a - i
        if a ** 4 + (a ** 3) * b + (a ** 2) * (b ** 2) + a * (b ** 3) + b ** 4 == j:
            print(a, b)
            exit()

Solution (Python):
x = int(input())

def go(x):
    for a in range(1, 1001):
        for b in range(-1000, 1001):
            if a**5-b**5 == x:
                print(a, b)
                return

go(x)

Solution (Python):
x=int(input())
for i in range(1000):
    for j in range(1000):
        if i**5-j**5==x:
            print(i,j);exit()
        elif i**5+j**5==x:
            print(i,-j);exit()

Solution (Python):

from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations, accumulate
import sys
import math
import bisect
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.buffer.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    def f(n):
        res = {1,n}
        i = 2
        while i**2 <= n:
            if n%i == 0:
                res.add(i)
                res.add(n//i)
            i += 1
        return res
    x = I()
    f = f(x)
    for a in range(10**7):
        a5 = a**5
        for l in f:
            b = a-l
            if a5 == x+b**5:
                print(a,b)
                return
    return


if __name__ == "__main__":
    solve()

Solution (Python):


import sys






















def main():
    mod = 1000000007                
    inf = float('inf')              
    
    sys.setrecursionlimit(10**6)    
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    x = ii()
    for a in range(-500, 500):
        for b in range(-500, 500):
            if a ** 5 - b ** 5 == x:
                print(f"{a} {b}")
                exit()



if __name__ == "__main__":
    main()

Solution (Python):
def main():
    X = int( input())
    for i in range(-200, 201):
        for j in range(-200, 201):
            if i**5 - j**5 == X:
                print(i, j)
                return
if __name__ == '__main__':
    main()

Solution (Python):
def main():
    X = int(input())
    for a in range(-200, 200):
        for b in range(-200, 200):
            if a ** 5 - b ** 5 == X:
                print(a, b)
                return
    raise
main()

Solution (Python):
def Int():
    return int(input())
def Ints():
    return map(int,input().split())
def IntList():
    return list(Ints())
def IntMat(N):
    return [IntList() for i in range(N)]

X = Int()
import sys

for A in range(-1000,1001):
    tmp = A**5
    
    for B in range(-1000,1001):
        if tmp - B**5==X:
            print(A,B)
            sys.exit()

Solution (Python):
X = int(input())
flag = False
for i in range(-10**3, 10**3):
    for j in range(-10**3, 10**3):
        if i**5 - j**5 == X:
            print(i,j)
            flag=True
            break
    if flag:
        break

Solution (Python):
lis = [i ** 5 for i in range(-300,300)]
x = int(input())
for i in range(len(lis)):
    for j in range(len(lis)):
        if lis[i] - lis[j] == x:
            print(i-300,j-300)
            exit()

Solution (Python):
X = int(input())
cand = [0]
n = 1
while n**5 - (n-1)**5 <= X:
    cand.append(n)
    cand.append(-n)
    n += 1
for a in cand:
    for b in cand:
        if a**5 - b**5 == X:
            print(a, b)
            exit()

Solution (Python):
x=input()
a=[0]
d={}
d[0]=0
for i in range(1,1000):
	a+=[i**5]
	a+=[-i**5]
	d[i**5]=i
	d[-i**5]=-i

a.sort()
for i in range(len(a)):
    if x+a[i] in a:
        print d[a[i]+x],d[a[i]]
        break

Solution (Python):
x = int(input())
facts = [i ** 5 for i in range(120)]
for a, a5 in enumerate(facts):
    for b, b5 in enumerate(facts):
        if a5 + b5 == x:
            print(a, -b)
            break
        if a5 - b5 == x:
            print(a, b)
            break
    else:
        continue
    break

Solution (Python):
def f(n):
    l, r = 0, 1 << 20
    while r - l > 1:
        m = (l + r) // 2
        if m ** 5 <= n:
            l = m
        else:
            r = m
    return l if l ** 5 == n else 0

X = int(input())
for i in range(1 << 20):
    a = f(X + i ** 5)
    if a:
        print(a, i)
        break
    a = f(X - i ** 5)
    if a:
        print(a, -i)
        break

Solution (Python):
x = int(input())


def is5(n):
    mi = 0
    ma = n
    while mi != ma:
        mm = (mi + ma) // 2
        if mm ** 5 >= n:
            ma = mm
        else:
            mi = mm + 1
    return mi ** 5 == n, mi


a = 0
while True:
    bb = a ** 5 - x
    if bb >= 0:
        ok, b = is5(bb)
        if ok:
            print(a, b)
            break
    else:
        ok, b = is5(-bb)
        if ok:
            print(a, -b)
            break
    a += 1

Solution (Python):
x = int(input())

for b in range(-500,500):
    for a in range(-500,500):
        if a**5 == b**5 + x:
            print(a,b)
            exit()

Solution (Python):
from bisect import bisect_left
X = int(input())
A = [pow(i,5) for i in range(-1000,1001)]
B = A[:]
for i,a in enumerate(A):
    bi = bisect_left(B,a-X)
    if B[bi]==(a-X):
        print(i-1000,bi-1000)
        break

Solution (Python):

import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
mans = inf ;ans = 0 ;count = 0 ;pro = 1

x = int(input())
for a in range(-300,300):
  for b in range(-300,300):
    if pow(a,5)-pow(b,5) == x:
      print(a,b);exit()

Solution (Python):
x = int(input())

for a in range(-1000, 1000):
    for b in range(-1000, 1000):
        if a ** 5 - b ** 5 == x:
            print(a, b)
            exit()

Solution (Python):
def examA():
    S = SI()
    if S=="ARC":
        ans = "ABC"
    else:
        ans = "ARC"
    print(ans)
    return

def examB():
    N, K = LI()
    snuke = set(range(1,N+1))
    for _ in range(K):
        d = I()
        A = LI()
        for a in A:
            snuke.discard(a)
    ans = len(snuke)
    print(ans)
    return

def examC():
    N, M = LI()
    H = LI()
    good = set(range(1,N+1))
    for _ in range(M):
        a, b = LI()
        if H[a-1]>=H[b-1]:
            good.discard(b)
        if H[b-1]>=H[a-1]:
            good.discard(a)
    ans = len(good)
    print(ans)
    return

def examD():
    X = I()
    
    for a in range(-1000,1000):
        for b in range(-1000,1000):
            if a**5-b**5==X:
                print(a,b)
                return
    return

def examE():
    ans = 0
    print(ans)
    return

def examF():
    ans = 0
    print(ans)
    return

import sys,bisect,itertools,heapq,math,random
from copy import deepcopy
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
def I(): return int(readline())
def LI(): return list(map(int,readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
global mod,mod2,inf,alphabet,_ep
mod = 10**9 + 7
mod2 = 998244353
inf = 10**18
_ep = 10**(-12)
alphabet = [chr(ord('a') + i) for i in range(26)]

sys.setrecursionlimit(10**7)

if __name__ == '__main__':
    examD()

"""
142
12 9 1445 0 1
asd dfg hj o o
aidn
"""

Solution (Python):
def main():

    X = int(input())
    for a in range(500):
        for b in range(-500, a):
            if a ** 5 - b ** 5 == X:
                return str(a) + " " + str(b)


print(main())

Solution (Python):
import sys
x=int(input())
l=[]
for i in range(-500,500):
  l.append([i**5,i])
for i in range(len(l)):
  for j in range(len(l)):
    if l[i][0]-l[j][0]==x:
      print(l[i][1],l[j][1])
      sys.exit()

Solution (Python):
X=int(input())
for i in range(-200,201):
    for j in range(-200,201):
        if i**5-j**5==X:
            print(i,j)
            exit()

Solution (Python):
X = int(input())

def solve() :
  for a in range(-1000, 1000) :
    for b in range(-1000, 1000) :
      if (a ** 5) - (b ** 5) == X :
        return (a, b)
        
print(*solve())

Solution (Python):

X = int(input())
import sys

for a in range(-201,201):

    for b in range(-201,201):

        if a**5 - b**5 == X:
            print (a,b)
            sys.exit()

Solution (Python):
x = int(input())

for i in range(400):
    for j in range(i - 800, i):
        if i ** 5 - j ** 5 == x:
            print(i, j)
            exit()

Solution (Python):
x = int(input())
if x == 2:
    print(1, -1)
    exit(0)
for d in range(1, int(x ** 0.5) + 1):
    for w in [-d, -x // d, d, x // d]:
        for a in range(-1000, 1000):
            if a ** 5 - (a - w) ** 5 == x:
                print(a, a - w)
                exit(0)

Solution (Python):
x = int(input())
for i in range(-200,200):
  for j in range(-200,200):
    if i**5 - j**5 == x:
      print(i,j)
      break
  else:
    continue
  break

Solution (Python):
import sys
x = int(input())
for i in range(1000):
    for j in range(1000):
        if i**5+j**5 == x:
            print(i, -j)
            sys.exit()
        if i**5-j**5 == x:
            print(i, j)
            sys.exit()

Solution (Python):
def input_int():
    return int(input())

def input_ints():
    return list(map(int, input().split()))

X = input_int()

def divs(n):
    i = 1
    res = []
    while i * i <= n:
        if n % i == 0:
            res.append(i)
            res.append(n // i)
        i += 1
    return res

import sys

for d in divs(X):
    for i in range(-10000, 10000):
        if (i + d) ** 5 - i ** 5 == X:
            print(i + d, i)
            sys.exit(0)

Solution (Python):
x = int(input())
for i in range(200):
    ii = i**5
    for j in range(-200, 200):
        jj = j**5
        if ii-jj == x:
            print(i, j)
            exit()

Solution (Python):
def solve():
   x = int(input())
   for a in range(-500,500):
      for b in range(-500,500):
         n = a**5 - b**5
         if n == x:
            print(a,end=" ")
            print(b)
            return
solve()

Solution (Python):
x=int(input())
for a in range(-200,200):
    for b in range(-200,200):
        if a**5-b**5==x:
            print(a,b)
            exit()

Solution (Python):
x=int(input())
lim=500
owari=False
for a in range(-lim,lim+1):
    if(owari):
        break
    for b in range(-lim,lim+1):
        if(a**5-b**5==x):
            print(a,b)
            owari=True
            break

Solution (Python):
x=int(input())
d={}
for a in range(10000000000000000000000000):
  aa=a**5
  m=x-aa
  if m in d:print(a,d[m]);exit()
  d[-aa]=a

  aa=-aa
  m=x-aa
  if m in d:print(a,d[m]);exit()
  d[-aa]=-a

Solution (Python):
from collections import defaultdict
import sys
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9 + 7
eps = 10**-7
input = sys.stdin.readline


def inp():
    return int(input())


def inpl():
    return list(map(int, input().split()))


X = inp()
MAX = 5000
for a in range(-MAX, MAX + 1):
    for b in range(-MAX, MAX + 1):
        tmp = pow(a, 5) - pow(b, 5)
        if X == tmp:
            print(a, b)
            exit()


assert False

Solution (Python):
x = int(input())

r = 500

for a in range(-r,r):
    for b in range(-r,r):
        if a**5 - b**5 == x:
            print(f"{a} {b}")
            exit()

Solution (Python):


import sys
readline = sys.stdin.readline
read = sys.stdin.read

n = int(input())


a = [i**5 for i in range(1000)]
for i in range(1000):
    for j in range(i+1,1000):
        if a[j]-a[i] == n:
            print(j,i)
            exit()
        if a[j]+a[i] == n:
            print(j,-i)
            exit()

Solution (Python):
x=int(input())
for i in range(-1000,1000):
  for j in range(-1000,1000):
    if i**5-j**5==x:
      print(i,j)
      exit()