peterverebics/CodeNet_Python_118 huggingface dataset:
X=int(input())
for a in range(3*10**2):
  for b in range(6*10**2):
    if(a**5-(b-300)**5==X):
      print(a,b-300)
      exit()
x = int(input())

l = []
for i in range(10 ** 9):
    if i ** 5 <= 10 ** 13:
        l.append(i)
        l.append(-i)
    else:
        break

for i in range(len(l) - 1):
    for j in range(i, len(l)):
        if l[i] ** 5 - l[j] ** 5 == x:
            print(l[i], l[j])
            exit()
import sys
a=int(input())
for i in range(151):
  b=i**5-a
  c=abs(b)
  j=0
  while j**5<=c:
    if j**5==c:
      if b>=0:
        print(i,j)
        sys.exit()
      else:
        print(i,-j)
        sys.exit()
    j+=1
def main():
    x = int(input())
    for A in range(-118,120):
        for B in range(-119,119):
            if (A**5 - B**5) == x:
                return([A,B])

ans = main()
print(' '.join(str(n) for n in ans))
def i():
    return int(input())
def i2():
    return map(int,input().split())
def s():
    return str(input())
def l():
    return list(input())
def intl():
    return list(int(k) for k in input().split())

x = i()
a = 0
b = 0
for i in range(-120,120):
	for j in range(-119,119):
		if i**5 - j**5 == x:
			a = i
			b = j
			print(a,b)
			exit()
x = int(input())

for i in range(-1000, 1000):
    flag = False
    for j in range(-1000, 1000):
        tmp = i ** 5 - j ** 5
        if tmp == x:
            print('{} {}'.format(i, j))
            flag = True
            break
    if flag:
        break
import math
def fact(n):
    ans = 1
    for i in range(2, n+1):
        ans*= i
    return ans
def comb(n, c):
    return fact(n)//(fact(n-c)*c)

x = int(input())
a = 0
b = 0
done = False
for f in range(-300, 300):
    for l in range(-300, 300):
        if((f**5)-(l**5)==x):
            a = f
            b = l
            done = True
            break
    if(done):
        break
print(a,b)
x=int(input())

for a in range(301):
    aa = pow(a,5) - x
    for b in range(301):
        if aa == pow(b,5):
            print(a,b)
            exit()

        if -aa == pow(b,5):
            print(a,-b)
            exit()
x=int(input())
a=0
b=0
for i in range(500):
  for j in range(-1000,1000):
    if i**5-j**5==x:
       a=i
       b=j
       break
print(a,b)
import sys
input = sys.stdin.readline
from collections import *

X = int(input())

for A in range(-500, 500):
    for B in range(-500, 500):
        if A**5-B**5==X:
            print(A, B)
            exit()
def resolve():
    N = 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 == N:
                print(a, -b)
                break
            if a5 - b5 == N:
                print(a, b)
                break
        else:
            continue
        break


resolve()
x = int(input())
A = 0
B = 0
for i in range(-1000,1000):
  if i**5 + x >= 0 and float.is_integer(round((i**5 + x)**0.2,5)) == True:
    A = (i**5 + x)**0.2
    B = i
    break

print(int(A),B)
import math
X=int(input())
end=False
for i in range(-120,120):
    for j in range(-120,120):
        if pow(i,5) - pow(j,5) == X:
            print(i,j)
            end=True
            break
    if end==True:
        break
X=int(input())
flag=0
for i in range(-129,129):
  for j in range(-129,129):
    if i*i*i*i*i-j*j*j*j*j==X:
      if flag==0:
        print(i,j)
        flag=1
from sys import stdin, setrecursionlimit

setrecursionlimit(10 ** 9)


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

X = int(input())
for A in range(-10 ** 3, 10 ** 3):
    A5 = A ** 5
    for B in range(-10 ** 3, 10 ** 3):
        if A5 - B ** 5 == X:
            print(A, B)
            exit()
x=int(input())
i=1
flag=0
for i in range(10000):
    for j in range(-1000,1001):
        if(i**5+j**5==x):
            flag=1
            print(i,-j)
            exit(0)
import sys

X = int(input())

for a in range(-1000,1001):
    for b in range(-1000,1001):
        if (a**5-b**5) == X:
            print(str(a)+" "+str(b))
            sys.exit()
X = int(input())
mem = dict()
i = 0
while True :
    a = pow(i, 5)
    if X == a*2 :
        print(-i, i)
        break
    if a in mem :
        print ( i, mem[a] )
        break

    mem[X-a] = -i
    mem[X+a] = i
    
    i += 1
from sys import *

def get(n):
	return n * n * n * n * n

X = int(stdin.readline())
for a in range(0, 10001):
	A = get(a)
	B = abs(A - X)
	lo = 0
	hi = 10000
	b = -1
	ok = False
	while lo <= hi:
		mid = (lo + hi) // 2
		sum = get(mid)
		if sum is B:
			b = mid
			ok = True
			break
		if sum < B:
			lo = mid + 1
		else:
			hi = mid - 1
	if ok is True:
		if A < X:
			b = -b
		print("{} {}".format(a, b))
		exit()
x=int(input())
a=0
b=-64

while True:
  t=a**5-b**5
  if t==x:
    break
  if t>x:
    b+=1
  else:
    a+=1
print(a,b)
x = int(input())

for i in range(-1000,1000) :
    flag = 0
    for j in range(-1000,i) :
        if x%(i-j) != 0 :
            continue
        v = x//(i-j)
        c = i**4+j**4+i*j*(i**2+i*j+j**2)
        if v == c :
            print(i,j)
            flag = 1
            break
    if flag == 1 :
        break
x = int(input())
def f(a,b):
    return a**5-b**5

for a in range(-120,120):
    for b in range(-120,120):
        if f(a,b)==x:
            print(a,b)
            exit()
import sys
K = int(input())
num = [i**5 for i in range(150)]
for i in range(len(num)):
    for j in range(len(num)):
        if num[i] - num[j] == K :
            print(i,j)
            sys.exit()
        elif num[i] + num[j] == K:
            print(i,-j)
            sys.exit()
X=int(input())
a=0
while a>-1:
  c=-1#b=a+c
  while c<0:
    if a**5-(a+c)**5==X:
      print(str(a)+" "+str(a+c))
      exit()
    elif a**5-(a+c)**5>X:
      break
    c-=1
  a+=1
import numpy as np
def check(x):
    x=abs(x)
    n=int(x**(float(0.2)))
    return n**5==x
def sol(x):
    for i in range(1,1001):
        if (check(i**5-x)):
            print (i,int(np.sign(i**5-x)*abs(i**5-x)**(float(0.2))))
            return

if __name__=='__main__':
    x=int(input())
    sol(x)
x=int(input())
e=0
for a in range(-1000,1000):
    for b in range(a-140,a+140):
        if (a**5)-(b**5)==x:
            print(a,b)
            e=1
            break
    if e==1:
        break
x = int(input())


i = 0
a, b = 0, 0
while i**5 < x:
    i += 1
mx = i
for k in range(2 * (mx + 1)):
    for j in range(-k, k + 1):
        if k**5 - j**5 == x:
            a, b = k, j
print(a, b)
import sys
X = int(input())
for i in range(-300,300):
    for j in range(-300,300):
        if i**5 -j**5 == X:
            print(i,j)
            sys.exit()
X = int(input())

for a in range(-120, 120):
    for b in range(-120, 120):
        if a ** 5 - b ** 5 == X:
            print(a, b)
            exit()
X = int(raw_input())

def solve():
    for A in range(-1000, 1000):
        for B in range(-1000, 1000):
            if A**5 - B**5 == X:
                print A, B
                return
solve()
import sys

x=int(input())
for a in range(10**3):
    for b in range(10**3):
        if a**5 - b**5==x:
            print(a,b)
            sys.exit()
        if (-a)**5 - b**5==x:
            print(-a,b)
            sys.exit()
        if a**5 - (-b)**5==x:
            print(a,-b)
            sys.exit()
        if (-a)**5 - (-b)**5==x:
            print(-a,-b)
            sys.exit()
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()
x=int(input())
A=0
B=0
for a in range(-500,500):
    for b in range(-500,500):
        if a**5-b**5==x:
            A=a
            B=b
            break
print(A,B)
x = int(input())

xset = set([])

for i in range(10000):
    xset.add(i**5)
    xset.add(-i**5)

for xx in xset:
    if xx+x in xset:
        a5 = xx+x
        b5 = xx

if a5 < 0:
    a = -pow(-a5, 0.2)
else:
    a = pow(a5, 0.2)

if b5 < 0:
    b = -pow(-b5, 0.2)
else:
    b = pow(b5, 0.2)

print(int(a), int(b))
x=int(input())
D=[1]
for i in range(2,int(x**0.5)+1):
    if x%i==0:
        D.append(i)
for d in D:
    for i in range(1000):
        if i**5-(i-d)**5==x:
            print(i,i-d)
            exit()
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()
import math
def main():
  x = int(input())
  for i in range(-118,120):
    for j in range(-119,129):
      if math.pow(i, 5) - math.pow(j, 5) == x:
        print(str(i) + ' ' + str(j))
        return
main()
x = int(input())
for i in range(-1000,1000):
    for j in range(-1000,1000):
        if x == i**5 - j ** 5:
            print(i,j)
            exit()
import sys; input = sys.stdin.buffer.readline
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")

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

#処理内容
def main():
	X = int(input())
	for i in range(-201, 201):
		for j in range(i + 1, 201):
			if j ** 5 - i ** 5 == X:
				print(j, i)
				return

	# for i in range(402):
	# 	for j in range(i + 1, 402):
	# 		if L[j] - L[i] == X:
	# 			print(L[j], L[i])
	# 			return

if __name__ == '__main__':
	main()
def main():
    X = int(input())

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


main()
x = int(input())

a = 0
b = 0

while True:
        
    for i in range(a+1):
        b = i
        s = -i
        
        if a**5 - b**5 == x:
            print(a,b)
            exit()
        
        if a**5 - s**5 == x:
            print(a,s)
            exit()
            
    a += 1
X = int(input())
# m = 0
# n = -1
# while X >= m**5-n**5:
#     m += 1
#     n += 1
# hazimete = 0
# while X >= hazimete ** 5:
#     hazimete += 1

for i in range(-500, 500):
    for j in range(-500, 500):
        if X == i**5 - j**5:
            print(i, j)
            exit()
x = int(input())
for i in range(1000):
    for j in range(1000):
        if i**5 + j**5 ==x:
            print(i, -j)
            exit(0)
        elif i**5 - j**5 ==x:
            print(i, j)
            exit(0)
x = int(input())
for i in range(1000):
    for j in range(i):
        if i**5 - j**5 == x:
            print(i,j, sep=' ')
            break
        elif i**5 + j**5 == x:
            print(i,j*(-1), sep=' ')
            break
x = int(input())
a = 0
b = 0
for i in range(-120, 120):
    for j in range(-120, 120):
        if i ** 5 - j ** 5 == x:
            a = i
            b = j
print(a, b)
from sys import stdin
input = stdin.readline


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

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


if(__name__ == '__main__'):
  main()
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()
x=int(input())
j=0
while True:
  j+=1
  for i in range(j+1):
    a=j
    b=j-i
    if pow(a,5)-pow(b,5)==x:
      print(a,b)
      exit(0)
    b*=-1
    if pow(a,5)-pow(b,5)==x:
      print(a,b)
      exit(0)
    b*=-1
    a*=-1
    if pow(a,5)-pow(b,5)==x:
      print(a,b)
      exit(0)
X=int(input())

for A in range(-10**3, 10**3):
  for B in range(-10**3, 10**3):
    if A**5-B**5==X:
      print(A, B)
      exit()
X = int(input())
A = 0
B = 0
for b in range(-500, 500):
    for a in range(b+1, 500):
        if a**5 - b**5 == X:
            A, B = a, b

print("{0} {1}".format(A, B))
#x**5-y**5 - int(input()) = 0


X = int(input()) #X <= 10**9

#x**5-y**5 <= 10**9



count = 0
for l in range(-1000,1000):
  for i in range(-1000,1000):
    if(l**5 -i**5 == X):
      print(l,i)
      count += 1
      break
  if(count == 1):
    break
n = int(input())

a = [i**5 for i in range(120)]
for i in range(120):
   for j in range(i+1,120):
       if a[j]-a[i] == n:
           print(j,i)
           break
       if a[j]+a[i] == n:
           print(j,-i)
           break
   else: continue
   break
x = int(input())
ans = []
for i in range(-120, 120):
  for j in range(-120, 120):
    if pow(i, 5) - pow(j, 5) == x:
      ans += [[i, j]]
ans = list(map(str, ans[0]))
print(" ".join(ans))
x = int(input())
 
for a in range(1, 120):
    for b in range(-65, 119):
        if a**5-b**5 == x:
            print(a, b)
            exit()
X=int(input())
def check():
    for a in range(-200,200):
        for b in range(-200,200):
            if a**5-b**5==X:
                print(a,b)
                return 0
check()
x = int(input())

l = [i**5 for i in range(1000)]

for i in range(len(l)-1):
    for j in range(i+1,len(l)):
        if l[j]-l[i]==x:
            print(int(l[j]**(1/5)),int(l[i]**(1/5)))
            exit()
        if l[j]+l[i]==x:
            print(int(l[j]**(1/5)),-int(l[i]**(1/5)))
            exit()
print('Not found')
def main():
    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()

    print('No')


def test():
    for i in range(-10, 11):
        for j in range(-10, 11):
            print(i**5-j**5)


if __name__ == "__main__":
    main()
    # test()
X = int(input())

for i in range(1000):
    for j in range(1000):
        if i ** 5 - j ** 5 == X:
            result = [i, j]
        if i ** 5 - (-j) ** 5 == X:
            result = [i, -j]

print(*result)
def main():
    x = int(input())
    a = 0
    while True:
        b = a**5 - x
        if b < 0:
            b = abs(b-0)**(1/5)
            b = b * (-1)
        else:
            b = b**(1/5)
        b = int(b)

        if a**5 - b**5 == x:
            print(a,b)
            return 0
        else:
            a+=1
    
if __name__ == '__main__':
    main()
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
import numpy as np
def main():
    x = int(input())
    for i1 in range(-201, 201):
        for i2 in range(-201, 201):
            if i1**5 - i2**5 == x:
                print(i1, i2)
                sys.exit()

if __name__ == '__main__':
    main()
n=int(input())
for i in range(1,1000):
  for j in range(-1000,1000):
    if i**5-j**5==n:
      print(i,j)
      exit()
x = int(input())

poypoyo = 'po'
for i in range(10000):
    for j in range(10000):
        if i**5 - j**5 == x:
            print(i,j)
            quit()
            break
        if i**5 - (-j)**5 ==x:
            print(i,-j)
            quit()
            break
        po = 'po'
        poypoyo += po
x = int(input())

for i in range(1000):
  for j in range(1000):
    if i**5 + j**5 == x:
      print(i)
      print(-j)
      exit()
    if i**5 - j**5 == x:
      print(i)
      print(j)
      exit()
#!/usr/bin/env python3
n = int(input())
list_5 = []
a = 0
b = 0
for _ in range(-121,121):
    list_5.append(_**5)
for i in range(-121,121):
    if (n + list_5[i]) in list_5:
        b = i  
        a = list_5.index(n + list_5[i])       
print(a-121, b-121)
import math
X = int(input())

d =math.floor(math.pow(X, 1.0/4.0))
for i in range(-d-1,d+1,1):
    for j in range(-d-1,d+1,1):
        if X+j**5==i**5:
            print(i,j)
            exit()
from sys import stdin

x = int(stdin.readline().rstrip())

for a in range(-118, 119):
    for b in range(-119, 118):
        if a ** 5 - b ** 5 == x:
            print(a, b)
            break
    else:
        continue
    break
import sys
X=int(input())
for j in range(-118,120):
    for i in range(-118,120):
        if pow(i,5)-pow(j,5)==X:
            print(i,j)
            sys.exit()
x = int(input())

num_list = {}
result = [ 0, 0 ]

for i in range(121):
    num_list[i ** 5] = i

for i in num_list:
    temp = i - x
    if(abs(temp) in num_list):
        result[0] = num_list[i]
        if(temp < 0):
            result[1] = num_list[abs(temp)] * -1
        else:
            result[1] = num_list[temp]

        break

print('{} {}'.format(result[0], result[1]))
X = int(input())
a = 0
for i in range(10**3,-10**3,-1):
    for j in range(10**3,-10**3,-1):
        if i**5 - j**5 == X:
            print("{} {}".format(i, j))
            exit()
def main():
    X = int(input())
    for i in range(-1000, 1000):
        for j in range(-1000, 1000):
            if i ** 5 - j ** 5 == X:
                print(i, j)
                return
main()
x = int(input())

for a in range(-118, 120):
    for b in range(-119, 119):
        if a**5-b**5 == x:
            print(a, b)
            exit()
from itertools import combinations

x = int(input())
num = [i**5 for i in range(1000)]

for a, b in combinations(num, 2):
    if a - b == x:
        print(int(a**0.2), int(b**0.2))
    elif a + b == x:
        print(int(a**0.2), -int(b**0.2))
    elif b - a == x:
        print(int(b**0.2), int(a**0.2))
    else:
        continue
    break
def pow_r(x, n):
    if n == 0:
        return 1
    if n % 2 == 0:
        return pow_r(x ** 2, n // 2)
    else:
        return x * pow_r(x ** 2, (n - 1) // 2)


x = int(input())
for a in range(-100, 1000):
    for b in range(-100, 1000):
        if x == (pow_r(a, 5)) - (pow_r(b, 5)):
            print(a, b)
            exit()
x=int(input())
d=[]
for i in range(1,int(x**(0.5))+1):
    if x%i==0:
        d.append(i)
        d.append(int(i/x))
for m in d:
    a=0
    f=0
    for b in range(-5*(10)**2,5*(10)**2,1):
        a=m+b
        if a**5-b**5==x:
            print(a,b)
            exit()
x = int(input())
import sys
# -125<A,B<125

l = list(range(-200, 200))
      

for A in l:
  for B in l:
    if pow(A,5) - pow(B,5) == x:
      print(A,B)
      sys.exit()
x=int(input())
for a in range(-500,500,1):
    for b in range(-500,500,1):
        if x==pow(a,5)-pow(b,5):
            print(a,b)
            exit()
X = int(input())
li = [i**5 for i in range(0,10000,1)]
for A in li:
    if A-X in li:#Bが自然数
        B = li.index(A-X)
        break
    elif A-X < 0:#Bが負の実数
        if abs(A-X) in li:
            B = (li.index((A-X)*(-1))) * (-1)
            break

print(li.index(A),B)
X = int(input())
for a in range(-118, 120):
    for b in range(-119, 119):
        if a <= b:
            continue
        if a**5-b**5 == X:
            print(a, b)
            exit()
x = int(input())
a = [i for i in range(120)] + [-i for i in range(1,119)]
b = [i for i in range(119)] + [-i for i in range(1,120)]

for i in a:
  for j in b:
    if i**5 - j**5 == x:
      print(i,j)
      exit()
import sys
X = int(input())
MOD = 10**9+7
M = [i*m for i in range(0, 10**4) for m in [-1, 1]]
for i in range(0, 10**4):
  for j in M:
    if i == j:
      break
    if X%(i-j)==0:
      if i**5-j**5==X:
        print(i, j)
        sys.exit(0)
x=int(input())
for A in range(-200,200):
  for B in range(-200,200):
    if A**5-B**5==x:
      print(str(A)+" "+str(B))
      exit()
(X,) = [int(x) for x in input().split()]

M = 10 ** 5
fifthRoot = {}
for i in range(-M, M + 1):
    fifthRoot[i ** 5] = i

for b5 in fifthRoot.keys():
    if b5 + X in fifthRoot:
        a5 = b5 + X
        a = fifthRoot[a5]
        b = fifthRoot[b5]
        assert a ** 5 - b ** 5 == X
        print(a, b)
        exit()
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
    #print(A)
    for B in range(-1000,1001):
        if tmp - B**5==X:
            print(A,B)
            sys.exit()
X = int(input())

ans = []

for i in range(-118,120):
  for j in range(-119,119):
    if i ** 5 - j ** 5 == X:
      ans = [i,j]
      break

print(*ans)
x = int(input())

cands = [(i**5,i) for i in range(-500,500)]

for a,i in cands:
  for b,j in cands:
    if a-b == x:
      print(i,j)
      exit()
def resolve():
    x = int(input())
    for i in range(-1000, 1000):
        for j in range(-1000, 1000):
            if i**5 - j**5 == x:
                print(i, j)
                return
resolve()
x = int(input())
for i in range(120):
    for j in range(120):
        A = i**5
        B = j**5
        if x == A+B:
            print(i,-j)
            exit()
        elif x == A-B:
            print(i, j)
            exit()
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
from itertools import combinations
X = int(input())
l = [(0,0)]
for i in range(1,121):
    a = pow(i,5)
    l.append((a,i))
    l.append((-a,-i))
for x in combinations(l,2):
    if abs(x[0][0]-x[1][0]) == X:
        if x[0][0]-x[1][0] > 0:
            ans = [x[0][1],x[1][1]]
        else:
            ans = [x[1][1],x[0][1]]
        break
print(*ans)
X = int(input())
for a in range(-120,120):
    for b in range(-120,120):
        if a ** 5 - b ** 5 == X:
            print(a, b)
            exit()
import math

x = int(input())

for a in range(-118, 119):
    for b in range(-119, 118):
        if math.pow(a, 5) - math.pow(b, 5) == x:
            print(a, b)
            exit()
x=int(input())

for i in range(-118,120):
    for j in range(-118,120) :
        if i**5-j**5==x :
            print(i,j)
            exit()
        else :
            continue
#D
X=int(input())
for i in range(1000):
    for a in range(1000):
        if a**5-(a-i)**5==X:
            print(a,a-i)
            break
X = int(input())

def myfunc(X):
  for a in range(-120,120):
    for b in range(-120,120):
      if a**5-b**5 == X:
        return a,b
      
a, b = myfunc(X)

print(a,b)
X = int(input())
for A in range(1000):
    for B in range(-1000,1000):
        if(A**5-B**5 == X):
            print(A,B)
            exit()
#import sys
#import numpy as np
import math
#from fractions import Fraction
import itertools
from collections import deque
from collections import Counter
import heapq
from fractions  import gcd
#input=sys.stdin.readline
#import bisect
x=int(input())
for a in range(-10**3,10**3):
    for b in range(-10**3,a):
        if pow(a,5)-pow(b,5)==x:
            print(a,b)
            exit()
x = int(input())

li = []
for i in range(-150,150):
    li.append((i**5, i))

for i in li:
    for j in li:
        if i[0] - j[0] == x:
            print(i[1], j[1])
            exit()
x = int(input())
for a in range(-118,120):
  for b in range(-119,119):
    if a**5-b**5==x:
      print(a,b)
      exit()
# D
import math
X = int(input())

B = -math.floor(math.pow(X, 0.2))
for b in range(B, 100000):
    tmp = math.pow(X + b ** 5, 0.2)
    if math.floor(math.floor(tmp+1.0e-6) - tmp + 1.0e-6) == 0:
        break
        
tmp = math.floor(tmp + 1.0e-6)
print(tmp, b)
import sys
readline = sys.stdin.readline

X = int(readline())

for a in range(1, 200):
    for b in range(-200, a):
        if a**5 - b**5 == X:
            print(a, b)
            exit(0)
MAX = 1000


def getAgenerator():
    for i in range(MAX):
        yield i


def getBgenerator():
    for j in range(MAX):
        yield j
        yield j * -1


X = int(input())

for a in getAgenerator():
    for b in getBgenerator():
        if a ** 5 - b ** 5 == X:
            print("{} {}".format(a, b))
            exit()
import sys

x = int(input())

for i in range(-1000, 1000):
    for j in range(-1000, 1000):
        if i ** 5 - j ** 5 == x:
            print(i, j)
            sys.exit()
def main():
    X = int(input())
    for a in range(-200, 201):
        for b in range(-200, 201):
            if a**5 - b**5 == X:
                return print(a, b)


if __name__ == '__main__':
    main()
x=int(input())
l=[i**5 for i in range(-1000,1001)]
ok=False
for i in range(len(l)):
    if ok:
        break
    for j in range(len(l)):
        if l[i]-l[j]==x:
            print(i-1000,j-1000)
            ok=True
            break
x = int(input())
a = 0
while True:
    n = (a**5)-x
    s2 = -1 if n < 0 else 1
    if s2 == -1:
        n = n * -1
    b = n**0.2
    if a**5-(int(b)*s2)**5==x:
        end = 1
        print(a, int(b) * s2)
        break
    a = a+1
X=int(input())
A=0
while True:
    B=0
    while A**5-B**5>=X:
        if A**5-B**5==X:
            print(A,B)
            exit()
        B+=1
    while A**5-B**5<=X:
        if A**5-B**5==X:
            print(A,B)
            exit()
        B-=1
    A+=1