peterverebics/CodeNet_Python_118 huggingface dataset:
import math


def main():
    x = int(input().strip())
    a = 0
    while True:
        b_5 = a ** 5 - x
        b = math.pow(abs(b_5), 1 / 5)
        if b_5 < 0:
            b *= -1

        if b == int(b):
            break
        a += 1
    print('{} {}'.format(int(a), int(b)))


if __name__ == '__main__':
    main()
N = int(input())
i = int(N ** 0.2)
for j in range(i):
	if N - j**5 == j**5:
		print(str(i) + " " + str(j))
		break
	else:
		j = j * -1
		if N - j**5 == j**5:
			print(str(i) + " " + str(j))
			break
print(str(i) + " " + str(j))
X = int(input())
x = 1
while ((x-1)**4)*5 > X:
  x += 1
for i in range(x):
  for j in range(-x, i):
    if i**5-j**5 == X:
      a = [i,j]
      print(*a)
def abc166_d():
  x = int(input())
  for i in range(-126, 127):
    for j in range(-126, 127):
      if i**5 + j**5 == x:
        print('{} {}'.format(i, j))
        return

abc166_d()
X = int(input())

for A in range(-100,100):
    for B in list(range(-100,100)):
        if A**5 - B**5 == X:
            print(f'{A} {B}')
            exit()
import numpy as np
X = int(input())

t = np.arange(-100000, 100000, 1)
t = t**2
S = set(t)

for B in range(-100000, 100001, 1):
    if X+B**5 in S:
        print("%d %d"%((X+B**5)**0.2, B))
        break
x=int(input())
a=int(x**(0.2))
f=0
while True:
    b=((f**5)-x)
    if b<0:
        b=-b
        e=b**(0.2)
        if e%1==0:
            print(f,int(-e))
            break
    else:
        e=b**(0.2)
        if e%1==0:
            print(f,int(e))
            break
    f+=1
X = int(input())

num = [-1, 1]
tmp1 = 0
tmp2 = 0
for i in range(101):
    for j in range(101):
        for k in num:
            for l in num:
                if((k*i)**5-(j*l)**5 == X):
                    print(i*k, j*l)
                    exit()
x = int(input())
check = 0
for a in range(100):
    for b in range(-100, 100):
        if a ** 5 - b ** 5 == x:
            print(a, b)
            check = 1
            break
    if check:
        break
X = int(input())
import sys
for i in range(-70, 71):
    b5 = pow(i, 5)
    a5 = X + b5
    a = pow(a5, 1/5)
    if isinstance(a, float) and a.is_integer():
        print(int(a), int(i))
        sys.exit(0)
X = int(input())

for A in range(100):
  for B in range(100):
    if A**5 - B**5 == X:
      print(str(A) + " " + str(B))
      break
    if A**5 + B**5 == X:
      print(str(A) + " -" + str(B))
      break
x = int(input())
a = 0
for i in range(-100, 100):
    for j in range(-100, 100):
        if i**5 - j**5 ==x :
            print(i, j)
            a = 1
            break
    if a == 1:
        break
import math

x = int(input())

def is_integer_num(n):
    if isinstance(n, int):
        return True
    if isinstance(n, float):
        return n.is_integer()
    return False

for i in range(-10000, 10**6):
    a = (x+i**5)**(1/5)
    if is_integer_num(a):
        print(int(a),i)
        break
x = int(input())
for i in range(120):
  for j in range(120):
    if i**5-j**5 == x:
        print(i, j)
    elif i**5+j**5 == x:
        print(i, -j)
    break
x = int(input())

import math

a = math.floor(math.pow(x, 1 / 5))
bp = a ** 5 - x

b = math.ceil(math.pow(abs(bp), 1 / 5))
if bp < 0:
    b = -b

print('{} {}'.format(a, b))
x = int(input())


i = 0
a, b = 0, 0
while i**5 < x:
    i += 1
mx = i
for k in range(mx + 1):
    for j in range(-k, k + 1):
        if k**5 - j**5 == x:
            a, b = k, j
print(a, b)
m=5**6;exec(f'i,j=m&63,m>>7;m-=i**5-j**5!={input()}or exit(print(i,j));'*2*m)
x = int(input())
ans = [i**5 for i in range(65)]
for i in ans:
    for j in ans:
        if i - j == x:
            print(ans.index(i), ans.index(j))
            exit()
        if i + j == x:
            print(ans.index(i), -ans.index(j))
            exit()
X = int(input())
A = 0
for a in range(10000):
    if a ** 5 <= X < (a+1) ** 5:
        A = a
        break
for b in range(-10000, 10000):
    if A ** 5 - b ** 5 == X:
        print(A, b)
        break
import sys
x = int(input())

for i in range(1000):
    for j in range(1000):
        if i**5 + j**5 ==x:
            print(i,end=" ")
            print(-j)
            sys.exit()
n = int(input())

for i in range(-100,100):
    for j in range(-100,100):
        if i**5 - j **5 == n:
            print(i,j)
            exit()
s = int(input())
j= -1
for i in range(-s, s):
    if i**5-j**5 == s:
        print(i, j) 
        break
x = int(input())
for a in range(10):
    b = round(abs(a ** 5 - x) ** (1 / 5))
    if x in [a ** 5 + b ** 5, a ** 5 - b ** 5]:
        if a ** 5 < x: b *= -1
        print(a, b)
        break
x = int(input())

a = -1
while True:
    a+=1
    bmin = round((x + a**5)**0.2, 1)
    bpls = round((x - a**5)**0.2,1)

    if isinstance(bmin, float) and bmin.is_integer():
        print(a,int(bmin))
        break
    elif isinstance(bpls,float) and bpls.is_integer():
        print(a,int(bpls))
        break
def resolve():
    x = int(input())
    five = []
    for i in range(-1000, 1001):
        five.append(i**5)

    for i in range(len(five)):
        for j in range(len(five)):
            if x == five[i]-five[j]:
                print("{} {}".format(i-999, j-999))
                exit()
resolve()
X=int(input())
for a in range(201):
 for b in range(401):
  if a**5-(b-200)**5==X:
   x=str(a)
   y=str(b)
L=[x,y]
L=' '.join(L)
print(L)
import math

X = int(input())

for i in range(int(math.sqrt(X))+1):
  if X % (i + 1) == 0:
    A_B = i + 1
    for A in range(i+1):
      B = A - A_B
      C = (A ** 4) + (A ** 3) * B + (A ** 2) * (B ** 2) + A * (B ** 3) + (B ** 4)
      if A_B * C == X:
        print("{} {}".format(A,B))
        break
    else:
        continue
    break
import sys
import itertools
arr = [i for i in range(-100,100)]
X = int(input())
t = len(arr)

for v in itertools.permutations(arr,2):
   if v[0]**5 - v[1]**5==X:
      print("{0} {1}".format(v[0],v[1]))
      sys.exit()
x = int(input())

for a in range(-64, 64):
    for b in range(-64, 64):
        if a ** 5 - b ** 5 == x:
            print(a, b)
            break
    else:
        continue
    break
x = int(input())
for i in range(-200, 200):
  for j in range(-200, 200):
    if(j**5 - i**5 == x):
      print(str(i) + " " + str(j))
      break
X=int(input())

for a in range(-101,101):
    for b in range(-101,101):
        if a**5-b**5==X:
            print(a,b)
            exit()
x = int(input())
a = 0
b = 0
flag = False
for i in range(10**7):
    tmp = (x + i)**(1/5)
    if tmp.is_integer():
        b = i
        a = x + b**5
        flag = True
        break
if flag == False:
    for i in range(-10**7,0):
        tmp = (x + i)**(1/5)
        if tmp.is_integer():
            b = i
            a = x + b**5
            break
print(int(a),int(b))
x = int(input())
for i in range(-500,500):
  for j in range(-500,500):
    a = pow(i,5)
    b = pow(j,5)
    if(x == a - b):
      print(a,b)
      exit()
import math
x = int(input())

x -= 1

a = math.pow(x,1.0/5.0)

print(int(a),-1)
a=int(input())
k=int(a**(1/int(5)))
f=a-k**5
h=-int(f**(1/int(5)))
print(k,h)
X = int(input())
A = [(i**5) for i in range(0, 1000)]
res = []
for i in range(len(A)):
  a = A[i]
  for j in range(len(A)):
    b = -A[j]
    cal = a - b
    if cal == X:
      print(i, -j)
      exit()
import sys
x = int(sys.stdin.readline())

flag = False
for i in range(-100, 100):
    for j in range(-100, 100):
        if i**5-j**5 ==x:
            print(i, j)
            flag = True
            break
    if flag == True:
        break
x=int(input())
l=[]
for i in range(1,int(x**0.5)+1):
  if x%i==0:
    l.append(i)
    l.append(x//i)
for i in l:
  for j in range(int(i**0.2)+1,0,-1):
    A=j
    B=j-i
    if A**5-B**5==x:
      print(A,B,sep=' ')
      exit()
import sys
import math
import fractions
from collections import deque
from collections import defaultdict
sys.setrecursionlimit(10**7)

X = int(input())

l = []
for i in range(0, 1000):
    l.append(i ** 5)

for i in range(len(l)):
    for j in range(len(l)):
        if l[i] + l[j] == X:
            print(i, j)
            sys.exit()
        if l[i] - l[j] == X:
            print(i, -j)
            sys.exit()
x = int(input())

five_pows = []
for i in range(80):
    five_pows.append(i**5)

flag = 0
for i in range(80):
    if flag:
        break
    for j in range(i, 80):
        if five_pows[j] - five_pows[i] == x:
            flag = 1
            print(j, i)
            break
        elif five_pows[j] + five_pows[i] == x:
            flag = 1
            print(j, -i)
            break
import sys
input=sys.stdin.readline
X = int(input().rstrip('\n'))
a = 0
while X>a**5:
  b1 = (X-a**5)
  b = b1**0.2
  if b.is_integer():
    print(a,int(b)*(-1))
    break
  else:
    a +=1
while a**5 >= X:
  b1 = (a**5-X)
  b = b1**0.2
  if b.is_integer():
    print(a,int(b))
    break
  else:
    a +=1
X = int(input())

for i in range(-177,177):
    for j in range(-177,177):
        if ((i**5)-(j**5) == X):
            print(i,j)
            break
x = int(input())
for i in range(int((x)**(1/5))+1):
    for j in range(-int((x)**(1/5))-1,int((x)**(1/5))+1):
        if i**5 - j**5 == x:
            print(i,j)
            break
    else:
        continue
    break
x=int(input())
n = 200
l = [x**5 for x in range(-n, n)]
for i,y in enumerate(l):
    if y+x in l:
        print(i)
        print(f'{int(l.index(y+x)-len(l)/2+1)} {int(i-len(l)/2+1)}')
import math

X = int(input())
M = int(10 ** (9 * 0.2)) + 10

def culc():
  for a in range(-M, M):
    a5 = pow(a, 5)

    for b in range(-M, M):
      b5 = pow(b, 5)

      if(a5 - b5 == X):
        print(" ".join(map(str, [a, b])))
        return

culc()
X = int(input())
a = []
for i in range(1000):
  a.append(i**5)
for i in range(1000):
  if X + a[i] in a:
    A = (X + a[i])**0.2
    B = i
  elif X - a[i] in a:
    A = int((X - a[i])**0.2)
    B = -i
print(A,B)
x = int(input())
A = 0
B = 0
for i in range(-10000,10001):
  if i**5+x >0 and float.is_integer((i**5 + x)**0.2) == True:
    A = (i**5 + x)**0.2
    B = i
    break

print(int(A),B)
x = int(input())

for a in range(1001001001):
    _b = a**5 - x
    if _b >= 0:
        if _b**0.2 == int(_b**0.2):
            print(a, int(_b**0.2))
            break
    elif _b < 0:
        if (-1*_b)**0.2 == int((-1*_b)**0.2):
            print(a, int((-1*_b)**0.2))
            break
x=int(input())

list=[]

for i in range(1, int(x**0.5)+1):
  if x % i == 0:
    list.append(i)
    if i != x // i:
      list.append(x//i)
          
for a in range(-(x+1),x+1):
  for l in list:
    b=a-l
    c=a**4+a**3*b+a**2*b**2+a*b**3+b**4
    if (x/c==(a-b)):
      break
    else:
      continue
  break
      
print(a,b)
x = int(input())

for i in range(-(10**2), 10**2+1):
    for j in range(-(10**2), 10**2+1):
        if i**5 - j**5 == x:
            print(i, j)
            exit()
import math
import sys
readline = sys.stdin.readline


def main():
    x = int(readline().rstrip())
    a, b, c = 1, 0, 1

    while a < 100:
        c = 1 if a ** 5 - x > 0 else - 1
        b = c * (c * (a ** 5 - x)) ** 0.2
        if b - int(b) == 0:
            print(a, int(b))
            return
        a += 1


if __name__ == '__main__':
    main()
x = int(input())

lower_limit, upper_limit = -10**2, 10**2

for a in range(lower_limit, upper_limit):
    for b in range(lower_limit, upper_limit):
        d = a ** 5 - x
        if d == b ** 5:
            print("{} {}".format(a, b))
            exit(0)
from itertools import combinations_with_replacement
#a, b = list(map(int, input().split(" ")))
x = int(input())

fivelist = dict()
for i in range(66):
    fivelist[i] = i**5

for a, ma in fivelist.items():
    for b, mb in fivelist.items():
        if ma + mb == x:
            tmp = -b
            print(f"{a} {tmp}")
            exit(0)
        elif ma - mb == x:
            tmp = - b
            print(f"{a} {tmp}")
            exit(0)
import os

def main():
	x = int(input())
	b = 0 
	a = 0
	while(x + b**5 != a):
		b -= 1
		if b == 100:
			a += 1
			b = 0
	print(1,b)
			


if __name__ == "__main__":
	main()
X = int(input())
c = 0
for a in range(-118, 119):
  for b in range(-118, 119):
    Y = a ** 5 - b ** 5
    if Y == X:
      A = a
      B = b
      print(A, B)
      c = 1
      break
  if c ==1:
    break
import math

X = int(input())

for i in range(X):
    factor1 = math.pow(X+i, 1.0/5.0)
    if factor1.is_integer():
        print(int(factor1), -i)
    factor2 = math.pow(X-i, 1.0/5.0)
    if factor2.is_integer():
        print(int(factor2), i)
X = int(input())

for i in range(X**5):
    B = i ** 5 -X
    if B < 0:
        C = (-B) ** (1/5)
        flg = 1
    else:
        C = B ** (1/5)
    if C.is_integer():
        if flg == 0:
            print(i,int(C))
            exit()
        else:
            print(i,-int(C))
            exit()
x = int(input())
count = 0
for i in range(-100,100, 1):
    for j in range(-100,100, 1):
        if i^5-j^5 == x:
            print(i,j)
            count=1
            break
    if count == 1:
        break
x=int(input())
for i in range(55):
    for j in range(55):
        if i**5+j**5==x:
            print(i,-j)
            exit()
x = int(input())
achieve = 0

for a in range(100):
    for b in range(-100,100):
        if(a**5 - b**5) == x:
            print(a, b)
            achieve = 1
    if achieve == 1:
        break
x = int(input())

q = 0
while abs(x) > q**5:
  q += 1

deta = False
for A in range(-q, q+1):
  if deta:
    break
  for B in range(-q, q+1):
    if A**5 - B**5 == x:
      print(A,B)
      deta = True
      break
x = int(input())

for i in range(185):
    for j in range(187):
        if ((i-118)**5)-((j-67)**5) == x:
            print(i,j)
            exit()
x = int(input())

for i in range(-100,100,1):
    #print(i)
    for j in range(-100,100,1):
        if i**5 - j**5 == x:
            print(i,j)
            exit()
x = int(input())

buf= pow(x,0.2)
a = int(buf)

while True:
    f = 0
    a5 = pow(a,5)
    b5 = a5 - x
    if b5 < 0:
        b5 = b5 * (-1)
        f = 1
    b = pow(b5,0.2)
    if f == 1:
        b = b * (-1)
    if b.is_integer:
        break
    a+=1
    
print(a,int(b))
X = int(input())
flg = False
for A in range(119):
    Ap = A**5
    for B in range(119):
        Bp = B**5
        if Ap-Bp==X:
            print(A,B)
            flg = True
            break
        elif Ap+Bp==X:
            print(A,-B)
            flg = True
            break
    if flg:
        break
import collections
x = int(input())
a = b = 0
b = -1
l = [i**5 for i in range(1000)]
for i in range(1000):
    tmp_i = i**5
    tmp_l = list(map(lambda n: n+tmp_i, l))
    if x in tmp_l:
        b = i-1
        a = tmp_l.index(x)+1
print(a, b)
#D
x = int(input())

l = [[]]
for i in range(0, 1000):
    for j in range(-1000, 0):
        if i ** 5 - j ** 5 == x:
            print(f'{i} {j}')
            exit()
X = int(input())

found = False
for i in range(1, int(X**0.5)+1):
    if X % i == 0:
        a = 0
        b = a - i
        while 1 <= a**5 - b**5 <= 10**9:
            if a**5 - b**5 == X:
                print(a, b)
                found = True
                break
            a += 1
            b = a - i
        if found:
            break
ans = int(input())
res = round(ans**0.2)

for i in range(-res, res+1):
    for j in range(-res, res+1):
        if j**5 - i**5 == ans:
            print(i,j)
            exit()
def resolve():
    X = int(input())

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

if __name__ == "__main__":
    resolve()
import sys
input = sys.stdin.readline
x = int(input())
for a in range(-65, 66):
    for b in range(-65, 66):
        if a**5 - b**5 == x:
            print(a, b)
            sys.exit()
x = int(input())

lower = -1
upper = -1
for i in range(100000000):
    pow5 = pow(i, 5)
    if lower == -1 and pow5 >= x:
        lower = i - 1

    if lower != -1 and upper == -1 and pow5 - pow(i-1, 5) >= x:
        upper = i
        break

for a in range(lower-1, upper+1):
    a5 = pow(a, 5)
    for b in range(-upper-1, upper+1):
        if a5 - pow(b, 5) == x:
            print(a, b)
            exit(0)

# 0, 0
print(0, 0)
x=int(input())

anses = set()
i = 0
while True:
    anses.add(i)
    anses.add(-i)
    if i**5 > 10**9:
        break
    i += 1

for a in list(anses):
    for b in list(anses):
        if a**5 - b**5 == x:
            print(a,b)
            exit(0)
X = int(input())

for i in range(X):
    B = i ** 5 -X
    if B < 0:
        C = (-B) ** (1/5)
        flg = 1
    else:
        C = B ** (1/5)
        flg = 0
    if C.is_integer():
        if flg == 0:
            print(i,int(C))
            exit()
        else:
            print(i,-int(C))
            exit()
import itertools
x = int(input())
num = [i**5 for i in range(3000)]
ans= list(itertools.combinations_with_replacement(num, 2))
for i in ans:
    if abs(i[0]-i[1]) == x:
        if i[0] < i[1]:
            print(int(i[0]**0.2),int(i[1]**0.2)*-1)
        else:
            print(int(i[0]**0.2),int(i[1]**0.2))
        break
    elif i[0]+i[1] == x:
        print(int(i[0]**0.2),int(i[1]**0.2)*-1)
        break
import numpy 
x = int(input())
max = 10**2+1
flag = False
for i in range(1,max):
    if x%i == 0:
        for j in range(-i,i+1): 
            if (numpy.power(i-j,5) - numpy.power(j,5)) == x:
                print(str(i-j)+" "+str(j))
                flag = True
                break
    if flag:
        break
X = int(input())
xxx = int(X ** (1/5))
for i in range(-1000000, 1000000):
    if xxx ** 5 - (i * i * i * i * i) == X:
        print(xxx, i)
        exit()
X = int(input())

for A in range(100):
    for B in range(100):
        if A ** 5 + B ** 5 == X:
           print(A, B*(-1))
           exit(0)
import math


def main():
    x = int(input().strip())
    a = 0
    while True:
        b = math.pow(x - a**5, 1 / 5)
        if b == int(b):
            break
    print('{} {}'.format(int(a), int(b)))


if __name__ == '__main__':
    main()
import math

X = int(input())

max = 64

a = []
b = []
bm = []
for i in range(max):
    a.append(i ** 5)
    b.append(a[i])
    bm.append(-1 * b[i])

atarget = 0
btarget = 0
for i in range(max):
    for j in range(max):
        if (a[i] == X + b[j]):
            btarget = j
            atarget = i
        if (a[i] == X + bm[j]):
            btarget = j * -1
            atarget = i


print(atarget, btarget)
import math
def D():
    X = int(input())
    for x in range(X):
        A = math.pow(x, 5)
        B = A-X
        if B == 0 or math.log(abs(B), 5).is_integer():
            print(int(A), int(B))
i=0
exec('j=-i;exec("i**5-j**5-%sor exit(print(i,j));j+=1;"*i*2);i+=1;'%input()*99)
import sys
input=lambda: sys.stdin.readline().rstrip()
x=int(input())
A=[int(i) for i in range(1000)]
Ans=[]
for a in A:
  for b in A:
    if a+b**5==x and not Ans:
      Ans=[a,-b]
    if a**5-b**5==x and not Ans:
      Ans=[a,b]
print(*Ans)
X=int(input())
dict=[]
for i in range(100):
    for j in range(100):
        if i**5-j**5==X:
            print(i,j)
            exit()
        if i**5+j**5==X:
            print(i,-1*j)
            exit()
x = int(input())
for a in range(-100,100):
  for b in range(-100,100):
    if(a**5 - b**5 == x ):
      print(a,b)
      break
x = int(input())
import math
f = 1
for A in range(-10**5,10**5):
    A5 = A ** 5
    if x - A5 > 0:
        f = -1
        B = round(math.pow(x - A5,1/5),0)
    else:
        B = round(math.pow(-(x - A5),1/5),0)
    if  A5 == x + B ** 5:
        print(A,int(B)*f)
        quit()
X = int(input())

minus = []
memo = []
i = 0
while i ** 5 < int(1e11):
    minus.append(-i**5)
    memo.append(i**5)
    i += 1

memo = minus + memo


for v in memo:
    tmp = X + v
    tmp2 = pow(tmp,1/5)
    if type(tmp2) != complex and int(tmp2) == tmp2:
        print(int(tmp2),end=" ")
        if v < 0:
            print(-int(pow(-v,1/5)),end=" ")
        else:
            print(int(pow(v,1/5)),end=" ")
        exit()
x = int(input())

lower = -1
upper = -1
for i in range(0, 1000):
    pow5 = pow(i, 5)
    if lower == -1 and pow5 > x:
        lower = i - 1

    if upper == -1 and pow5 - pow(i-1, 5) > x:
        upper = i
        break

for a in range(lower, upper+1):
    a5 = pow(a, 5)
    for b in range(-100, a):
        if a5 - pow(b, 5) == x:
            print(a, b)
            exit(0)

print("no")
x=int(input())
for i in range(120):
 for j in range(-53,i):
  if i**5-j**5==x:print(i,j);exit()
x = int(input())

def solve(x):
	for first in range(-65, 66):
		for sec in range(-65, 66):
			if first**5 - sec**5 == x:
				print(first, sec)
				return

solve(x)
x = int(input())
for i in range(-10,10):
    for j in range(-10,10):
        if i**5 - j**5 == x:
            print(i,j)
            quit()
from math import pow
X = int(input())
print(int(pow(X-1, 1.0/5.0)), -1)
import math

X = int(input())
yaku = []

def nibu(a, b):
  small = -10**10
  big = 10**10
  while big-small > 1:
    mid = (small+big)//2
    x = X + pow(mid,5)
    if x > b:
      big = mid
    elif x < b:
      small = mid
    else:
      print(x,mid)
      exit()

for i in range(1,int(X**0.5+1)):
  if X%i == 0:
    yaku.append([i,X//i])
    
for el in yaku:
  a = el[0]
  b = el[1]
  nibu(a,b**5)
  nibu(b,a**5)
x = int(input())

def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

p = make_divisors(x)
print(p)

for i in p:
  for b in range(-100,100):
    if (b+i)**5 - b**5 == x:
      print(b+i,b)
      exit()
X = int(input())

for a in range(0, 101):
    for b in range(-100, 101):
        if (a**5) - (b**5) == X:
            print(a, b)
            exit()
x = int(input())
for i in range(200):
  for j in range(-200,200):
    if(i**5+j**5==x):
      print(i,j)
      break
import sys
def f(x):
    N = -1000
    for a in range(-N, N+1):
        A = a**5
        B = A-x
        for j in range(-N, N+1):
            if j ** 5 == B:
                print(a, j)
                return 
x, = map(int, input().split())
f(x)
x = int(input())
for a in range(-1000,1001):
    b = int(pow(a,5))-x
    if b<0:
        b = -1*pow(abs(b),1/5)
    else:    
        b = pow(b,1/5)
    if b==int(b):
        if int(pow(a,5) - int(pow(b,5))) == x:
            print(a,int(b))
        else:
            print(int(b),a)
        break
X = int(input())

for a in range(-64, 65):
  for b in range(-64, 65):
    if a ** 5 - b ** 5 == X:
      print(a, b)
      exit()
X = int(input())
for i in range(-65,65):
    for j in range(-65,65):
        if i**5 - j**5 == X:
            print(i,j)
            exit()
X = int(input())

for i in range(1,101):
  for j in range(-100,i):
    x = i ** 5 - j ** 5
    if X == x:
      print(i,j)
      break
  break
x=int(input())
value=0
index=0
hashmap=dict()
while value<int(1e9)+1:
    value=pow(index,5)
    hashmap[value]=index
    index+=1
#print(hashmap)    

for i in range(1,100):
    b1=x+int(pow(i,5))
    b2=x+int(pow(-i,5))
#    print(i,b1,b2)
    if hashmap.get(b1)!=None:
        print(hashmap[b1],i)
        break
    if hashmap.get(b2)!=None:
        print(hashmap[b2],-i)
        break
x=int(input())
a=0
b=0
for i in range(-100,100):
  for j in range(-100,100):
    if i**5-j**5==x:
      a=i
      b=j
      break
  else:
    continue
  break
print(a,b)
X = int(input())
j = 1
for i in range(1,X//2+2):
  if X%i == 0:
    if i != 1:
      j = i
      break


a_b=j
tmp = X//i
for k in range(-100,100):
  b = -k
  a = a_b + b
  if a**5 - b**5 == X:
    print(a,b)
    exit()
for k in range(-100,100):
  b = -k
  a = tmp + b
  if a**5 - b**5 == X:
    print(a,b)
    exit()
X = int(input())
 
flag = 0
A = 0
B = 0
 
for i in range(0, 100):
  for j in range(0, 100):
    if i**5 - j**5 == X:
      A = i
      B = j
      break
    elif i**5 + j**5 == X:
      A = i
      B = j
      break
    elif -i**5 - j**5 == X:
      A = -i
      B = j
      break
print(str(A) + ' ' + str(B))
x=int(input())
for a in range(-10**2, 10**2, 1):
    for b in range(-10**2, 10**2, 1):
        if ((a**5)-(b**5))==x:
            print(a,b)
            exit()