peterverebics/CodeNet_Python_118 huggingface dataset:
x = int(input())
for i in range(-120,121):
  for j in range(-120, 121):
    if i ** 5 - j ** 5 == x:
      print(i,j)
      break
  if i ** 5 - j ** 5 == x:
    break
X = int(input())

for a in range(1000):
  for b in range(-1000,a):
    if a**5 - b**5 == X:
      print(a,b)
      exit()
import sys
# 再起回数上限変更
# sys.setrecursionlimit(1000000)

x = int(input())

for i in range(-200, 200):
    for j in range(-200, 200):
        if int(i ** 5 - j ** 5) == x:
            print(i, j)
            sys.exit()
x=int(input())
ans=[0,0]
for a in range(-200,200):
    for b in range(-200,200):
        if a**5-b**5==x:
            print(a,b)
            break
    else:
        continue
    break
x=int(input())
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)
      exit()
#!/usr/bin/env python3
x = int(input())
for b in range(-(10 ** 4), 10 ** 4):
    ok = 0
    ng = 10 ** 6
    while ng - ok > 1:
        m = (ok + ng) // 2
        if m ** 5 - b ** 5 <= x:
            ok = m
        else:
            ng = m
    a = ok
    if a ** 5 - b ** 5 == x:
        print(a, b)
        exit()
X=int(input())

M=130

for i in range(-130,130):
    for j in range(-130,130):
        if i**5-j**5==X:
            print(i,j)
            break
    else:
        continue
    break
import sys 
x = int(input())

for a in range(1001):
    for b in range(-1000,1001):
        if x == a**5 - b**5:
            print(a,b)
            sys.exit()
def I(): return int(input())
def LI(): return list(map(int,input().split()))
def MI(): return map(int,input().split())
def LLI(n): return [list(map(int, input().split())) for _ in range(n)]

x = I()
t = 0
for i in range(-1000,1000):
    for j in range(-1000,1000):
        if i**5 -j**5 == x:
            print(i,j)
            t = 1
            break
    if t==1:
        break
def solve():
    x = int(input())
    for i in range(-150, 151):
        for j in range(-150,i):
            if i ** 5 - j ** 5 == x:
                print(i,j)
                return

if __name__ == '__main__':
    solve()
import numpy as np
X=int(input())
flag=1
for c in range(np.power(10,9)):
    c+=1
    x=X
    if x%c==0:
        x=x//c
        for a in range(np.power(10,3)):
            if (np.power(a,4) + np.power(a,3)*(a-c) + np.power(a,2)*np.power(a-c,2) + a*np.power(a-c,3) + np.power(a-c,4))==x:
                print(a,a-c)
                flag=0
                break
    if flag==0:
        break
x = int(input())
ok = 0

for i in range(-118, 120):
    if ok > 0:
        break
        
    for j in range(-118, 120):
        if i**5 - j**5 == x:
            print(i, j)
            ok += 1
            break
x=int(input())

for a in range(-150,150):
    for b in range(-150,150):
        if a**5-b**5==x:
            ans=(a,b)
print(*ans)
x=int(input())
for i in range(-120,120):
  for j in range(-120,120):
    if i**5-j**5==x:
      print(i,j)
      exit()
X =int(input())
A =[i**5 for i in range(1,121)]
a =[i for i in range(1,120)]
B =[i**5 for i in range(-120,121)]
b =[i for i in range(-120,121)]

flg =False
for i in range(len(A)):
    for j in range(len(B)):
        if A[i]  -  B[j]  == X:
            print("{} {}".format(a[i],b[j]))
            flg =True
            break
    if flg:
        break
x = int(input())
for a in range(-200, 200):
  for b in range(-200, 200):
    if a ** 5 - b ** 5 == x:
      print(a, b)
      break
  else:
    continue
  break
x = int(input())
d = dict()
for i in range(-200, 201):
	d[i**5] = i
for i in d:
	if x+i in d:
		print(d[x+i], d[i])
		break
import math

l = []
ans = []
x = int(input())

a = int( (x) ** (1/5) )

for i in range(a - 1000, a + 1000):
    l.append(i)

for i in range(1,len(l)):
    for j in range(len(l)):
        tmp = math.pow(l[j],5) - math.pow(l[i],5)
        if tmp == x:
            print(l[j],l[i])
            break
    else:
        continue
    break
m=5**6
exec(f'i,j=m%128,m>>7;m-=i**5-j**5!={input()}or exit(print(i,j));'*2*m)
import sys

def debug(*args):
    print(*args, file=sys.stderr)


x_diff_of_5th_factor = int(input())


for a in range(-118, 119):
    for b in range(-119, 118):
        if a ** 5 - b ** 5 == x_diff_of_5th_factor:
            print('{} {}'.format(a, b))
            sys.exit(0)

sys.exit(1)
x = int(input())
n = int((10**9)**(1/5))
for a in range(10**3):
    for b in range(10**3):
        if a**5 - b**5 == x: 
            print(a, b)
            exit()
        elif a**5 + b**5 == x:
            print(a, -b)
            exit()
print('error')
x = int(input())

for a in range(-1000, 1000):
    for b in range(-1000, 1000):
        if a**5 - b**5 == x:
            print(a, b)
            break
    else:
        continue
    break
x=int(input())
for a in range(0,1000):
    for b in range(0,1000):
        a5=a**5
        b5=b**5
        if(a5-b5)==x:
            print(a,b)
            exit()
        if(a5+b5==x):
            print(a,-b) 
            exit()
import sys, math
x = int(sys.stdin.readline())

L = [i**5 for i in range(10000)]
flag = False
for i in range(10000):
    for j in range(10000):
        if L[i] - L[j]==x:
            print(i, j)
            flag = True
            break
        elif L[i] + L[j]==x:
            print(i, -j)
            flag = True
            break
    if flag ==True:
        break
else:
    print('No')
import sys

X = int(input())

for A in range(-200, 200, 1):
  for B in range(-200, 200, 1):
    if A**5 - B**5 == X:
      print("{0} {1}".format(A, B))
      sys.exit(0)
X=int(input())

ans=[0,0]
i=0
while i<=1000:
    j=-1000
    while j<=1000:
        if i**5-j**5==X:
            ans=[i,j]
        j+=1
    i+=1 

print(*ans)
X = int(input())
flag = False
for a in range(-118, 120):
    for b in range(-119, 119):
        if a**5 - b**5 == X:
            print('{} {}'.format(a,b))
            flag = True
            break
    if flag:
        break
x = int(input())

for a in range(-121, 121):
    for b in range(-121, 121):
        if a ** 5 - b ** 5 == x:
            print(a ,b)
            break
    if a ** 5 - b ** 5 == x:
        break
def main():
    x=int(input())
    for i in range(-200,200):
        for j in range(-200,200):
            if i**5-j**5==x:
                print(i,j)
                return
    raise Exception()
main()
def ABC166D(x):
    for a in range(-118, 120):
        for b in range(-119, 119):
            if a**5 - b**5 == x:
                print(a, b)
                return

x = int(input())
ABC166D(x)
n = int(input())
arr = []
for i in range(1,int(pow(n,1/2))+1):
  if n % i == 0:
    arr.append(i)
res = []
for i in range(len(arr)):
  for j in range(-arr[i]-1,int(pow(n,1/2)+1)):
    if (j + arr[i])**5 - j**5 == n:
      res = [j+arr[i],j]
      break
print(*res)
x = int(input())


def f(a, b):
    return a**5-b**5


divisors = set()
for i in range(1, int(10**9**.5)+1):
    if x % i == 0:
        divisors |= {i, x//i}


for b in range(-1000, 1000):
    for div in divisors:
        a = div+b
        if f(a, b) == x:
            print(a, b)
            exit()
k = [i ** 5 for i in range(200)]
x = int(input())
for a, i in enumerate(k):
    for b, j in enumerate(k):
        if i - j == x:
            ans = (a, b)
            break
        elif i + j == x:
            ans = (a, -b)
            break
ans = str(ans[0]) + ' ' + str(ans[1])
print(ans)
N=input()
for a in range(-200,200):
    for b in range(-200,200):
        if a**5-b**5==N:
            print a,b
            quit()
X=int(input())
for i in range(120):
  for j in range(i+1):
    if i**5-j**5==X:
      print(i,j)
      break
      break
    if i**5+j**5==X:
      print(i,-j)
      break
      break
x = int(input())

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

for i in range(-118,120):
  for j in range(-118,120):
    if pow(i, 5) - pow(j, 5) == n:
      print(i,j)
      quit()
n=int(input())
flag=False
for i in range(1000):
    for j in range(-1000,i):
        if i*i*i*i*i-j*j*j*j*j==n:
            print(i,j)
            flag=True
            break
    if flag:
        break
#4970069925031
#1985049910084967
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()
def main():
    x = int(input())
    is_answered = False
    for a in range(-200, 201):
        if is_answered:
            break
        for b in range(-200, 201):
            if pow(a, 5) - pow(b, 5) == x:
                print(a, b)
                is_answered = True
                break


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

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

print(a, b)
X = int(input())
flag = 1
a = -1000
b = -1000
for i in range(-1000, 1000):
  for j in range(-1000, 1000):
    if i**5-j**5 ==X:
      a = i
      b = j
print(f"{a} {b}")
import itertools

X = int(input())
nums = []
for i in range(121):
  nums.append(i**5)

comb = itertools.combinations(nums, 2)
ans = 0

for c in comb:
  a,b = c
  if c[0]+c[1] == X:
    print(int(a**(1/5)),int(-b**(1/5)))
  elif -c[0]+c[1] == X:
    print(int(-a**(1/5)),int(-b**(1/5)))
  elif c[0]-c[1] == X:
    print(int(a**(1/5)),int(b**(1/5)))
  elif -c[0]-c[1] == X:
    print(int(-a**(1/5)),int(b**(1/5)))
X = int(input())
 
flag = 0
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
      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())
flag = False
for i in range(-120,120):
    for j in range(-120,120):
        if i**5 - j**5 == X:
            print(str(i) + ' ' + str(j))
            flag = True
            break
    if flag:
        break
X = int(input())

def solve():
  for A in range(-118, 120):
    for B in range(-119, 119):
      if A*A*A*A*A - B*B*B*B*B == X or A*A*A*A*A + B*B*B*B*B == X:
        print(A, B)
        return

solve()
x = int(input())

for a in range(-200, 201):
    t = a ** 5
    for b in range(-200, 201):
        if t - (b ** 5) == x:
            print('{} {}'.format(a, b))
            exit()
import math

x = int(input())
for i in range(1, 121):
    for j in range(-120, 121):
        if i**5 - j**5 == x:
            print(i, j)
            quit(0)
import math

x = int(input())

a = 0
b = 0
while b**5 > -x:
    b -= 1

while a**5-b**5 != x:
    if a**5-b**5 < x:
        a += 1
    else:
        b += 1
        
print(a, b)
x=int(input())
ans=0
for i in range(-120,120):
    for j in range(-120,120):
        ans = i**5-j**5
        if ans == x:
            print(i,j)
            break
    else:
        continue
    break
def q4():
    X = int(input())
    for A in range(-255, 255):
        for B in range(-255, 255):
            if A**5 - B**5 == X:
                print(A, B)
                return


if __name__ == '__main__':
    q4()
import sys
input = sys.stdin.readline
# sys.setrecursionlimit(100000)

# A and B will be less than 119


def main():
    X = int(input().strip())
    for A in range(-119, 120):
        for B in range(-119, 120):
            if A ** 5 - B ** 5 == X:
                return "{} {}".format(A, B)

    else:
        return "Invalid X"


if __name__ == "__main__":
    print(main())
x = int(input())
flag = False

for i in range(1, 200):
    resid = i ** 5 - x
    for j in range(-200, 200):
        if j**5 == resid:
            print(i, j)
            flag = True
            break
    if flag:
        break
X=int(input())

for a in range(120):
    for b in range(120):
        A=a**5
        B=b**5
        if X==A+B:
            print(a,-b)
            exit()
        elif X==A-B:
            print(a,b)
            exit()
x=int(input())
for i in range(-120,120):
    for l in range(-120,120):
        g=i**5
        g-=l**5
        if g==x:
            print('{} {}'.format(i,l))
            exit()
x = int(input())
for a in range(-120,121):
    for b in range(-120,121):
        if a**5 - b**5 == x:
            print(a,b)
            exit(0)
import sys
X = int(input())
from math import sqrt,floor
cand = []
for i in range(1,floor(sqrt(X))+1):
    #print(i)
    if X%i == 0:
        k = X//i
        #print(i,k)
        for j in range(10000):
            eq = (j-i)**4 + (j-i)**3 * j + (j-i)**2 * j**2 + (j-i) * j**3 + j**4
            #print(j,i,eq)
            if eq == k:
                print(j,j-i)
                sys.exit()
X = int(input())
for a in range(10**3):
    for b in range(10**3):
        if a**5 - b**5 == X:
            print(a,b)
            exit()
        if a**5 + b**5 == X:
            print(a,-b)
            exit()
n = int(input())
a = 0
b = 0

for i in range(-300,300):
  for j in range(-300,300):
    if i**5-j**5 == n:
      a = i
      b = j
      break
print(a,b)
x = int(input())
l = []
for i in range(150,-150,-1):
    l.append(i**5)
for i in range(299):
    for j in range(300):
        if l[i] - l[j] == x:
            print(150-i,150-j)
            exit()
x = int(input())
flag = False

for i in range(10**3+1):
    for j in range(2*10**3+2):
        if i**5-(j-1000)**5 == x:
            print(i,j-1000)
            flag =True
            break
    if flag:
        break
x = int(input())
for a in range(-120,121):
  for b in range(-120,121):
    if a**5 - b**5 == x:
      print(a,b)
      exit()
import sys

x = int(input())

for i in range(-120,120):
    for j in range(-120,120):
        if (i)**5 - j**5 == x:
            print(i,j)
            sys.exit()
import bisect as bi
import collections as cc
I=lambda:list(map(int,input().split()))
x,=I()
ar=[]
i=1
fl=1

t=bi.bisect_left(ar,x)
for i in range(-1000,1000):
    for j in range(-1000,1000):
        if pow(i,5)-pow(j,5)==x:
            print(i,j)
            fl=0
            break
    if not fl:
        break
x = int(input())
for i in range(243):
    for j in range(243):
        if (i-121)**5 - (j-121)**5 == x:
            print(i-121,j-121)
            exit()
x = int(input())
for a in range(1000):
    for b in range(-1000, 1000):
        if a ** 5 - b ** 5 == x:
            print(a, b)
            exit()
X = int(input())
break_flag = 0
for i in range(120):
  for j in range(i):
    a, b = i, j
    if a**5 - b**5 == X:
      print(a, b)
      break_flag = 1
      break
    elif a**5 + b**5 == X:
      print(a, -b)
      break_flag = 1
      break
  if break_flag == 1:
    break
x = int(input())

flag = False
for a in range(-1000, 1000):
    for b in range(-1000, 1000):
        if (a**5 - b**5) == x:
            print(a, b)
            flag = True
            break
    if flag:
        break
def resolve():
	x = int(input())
	for i in range(-1000, 1001):
		for j in range(-1000, 1001):
			if i**5 - j**5 == x:
				print(i, j)
				return
resolve()
# A^5-B^5=(B+d)^5-B^5

X=int(input())

div=[1,X]

for i in range(2,X):
    if X%i==0:
        div.append(i)
        div.append(X//i)
    if i*i>=X:
        break

for d in div:
    for j in range(-100000,100000):
        A=j+d
        B=j
        if A**5-B**5==X:
            print(str(A)+" "+str(B))
            exit(0)
X = int(input())

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))
        break
    a+=1
x = int(input())

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

for i in range(-500,500):
    for j in range(-500,500):
        if (i**5) - (j**5) == x:
            print(str(i) + ' ' + str(j))
            flag = 1
            break
    if flag == 1:
        break
def resolve():
	x = int(input())
	for i in range(1000):
		for j in range(-1000, 1000):
			if i**5 - j**5 == x:
				print(i, j)
				return

resolve()
import sys

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

    for a in range(-1000, 1000):
        for b in range(-1000, 1000):

            if X == a**5 - b**5:
                break

        else:
            continue
        break

    print(a, b)
    return

if __name__ == '__main__':
    main()
    sys.exit(0)
x = int(input())
for a in range(120):
    for b in range(-120, a):
        if pow(a,5)-pow(b,5)==x:
            print(a,b)
            break
    else:
        continue
    break
X = int(input())

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

for i in range(10**9):
  for j in lis:
    if i**5-(i-j)**5==X:
      print(i, i-j)
      exit()
X = int(input())

def f():
    for A in range(-118, 120):
        for B in range(-119, 119):
            if pow(A, 5) - pow(B, 5) == X:
                print(f"{A} {B}")
                return

f()
import math
x=int(input())
flag=0
for i in range(150,0,-1):
    for j in range(-100,i):
        if pow(i,5)-pow(j,5)==x:
            print(i,j)
            flag=1
    if flag==1:
        break
def solve(x):
  if x == 1:
    print(1, 0)
    return
  if x == 2:
    print(1, -1)
    return
  for d in range(1, x):
    #print('0:', d)
    if d**2 > x:
      break
    if x % d:
      continue
    for a in range((d+1)//2, x):
      #print('1:', a, a - d)
      t = a**5 + (d - a)**5
      if t == x:
        print(a, a-d)
        return
      if t > x:
        break
                

X = int(input())
solve(X)
import sys
x = int(input())
for b in range(-100000, 100000):
    a = (x+b**5)**(1/5)
    if type(a) == float:
        int_a = int(a)
        if int_a**5 - b**5 == x:
            print(int(a), b)
            exit()
x=int(input())
for a in range(-118,120):
    for b in range(-118,120):
        if a**5-b**5==x:
            print(a,b)
            exit()
import sys

input = sys.stdin.readline


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

    for A in range(-119, 120 + 1):
        for B in range(-119, 120 + 1):
            if A ** 5 - B ** 5 == X:
                print(A, B)
                exit()


if __name__ == "__main__":
    main()
X = int(input())
for A in range(-118, 120):
    for B in range(-119, A):
        if A**5 - B**5 == X:
            print(A, B)
            break
    else:
        continue
    break
x = int(input())

for a in range(0,1000):
    for b in range(-1000, 1000):
        if a ** 5 - b ** 5 == x:
            print(a,b)
            break
    else:
        continue
    break
X = int(input())
for A in range(1000):
    for B in range(1000):        
        if A**5 - B**5 == X:
            print(A, B)
def main():
    X = int(input())  # 文字列または整数(一変数)

    for B in range(0, 1000):
        for A in range(B, 1000):
            if A**5 - B**5 == X:
                print(A, B, sep=" ")
                return
            if A**5 + B**5 == X:
                print(A, B, sep=" ")
                return

if __name__ == '__main__':
    main()
def main():
  x=int(input())
  for i in range(10**9):
    y=x-i**5
    if y>0:
      s=1
    else:
      s=-1
    if(abs(y)**0.2).is_integer():
      return (i,-s*int(abs(y)**0.2))
    if(abs(x+i**5)**0.2).is_integer():
      return (-i,-s*int(abs(y)**0.2))
print(main())
m=6**6
exec(f'i,j=m%120,m//120;m-=i**5-j**5!={input()}or exit(print(i,j));'*m)
s = int(input())
j= -1
for i in range(-s, s):
    if i**5-j**5 == s:
        if i == abs(j)+1 or j == abs(i)+1:
            print(i, j)
            j += 1
            break
import math
x = int(input())
for i in range(0, x):
    b = int(i**5 - x)
    if b > 0:
        b = b**0.2
    else:
        b = -((-b)**0.2)
    try:
        if b % 1 == 0:
            print(i, int(b))
            break
    except:
        pass
import sys
X = int(input())

i, j = 0, 0
for b in range(1, 1000):
    for z in range(1, 1000):
        if b**4 + 10*b**3*z + 10*b**2*z**2 + 5*b*z**3 + z**4 == X//z:
            print(b+z, b)
            sys.exit()
x=int(input())
f=0
for i in range(x):
  for j in range(i+1,x+1):
    if (i**5-j**5)==x:
      print(i,j)
      f=1
  if f==1:
    break
x = int(input())
power5 = [i ** 5 for i in range(100)]
for i in power5:
  for j in power5:
    if i - j == x:
      print(i, j)
      exit()
for i in power5:
  for j in power5:
    if i + j == x:
      print(i, -j)
      exit()
import math
x = int(input())
for b in range(-100, 100):
    v = b ** 5 + x
    p = pow(v, 0.2)
    if p == p.real:
       print(p.real, b)
       break
import math
x = int(input())
for i in range(0, math.ceil(math.sqrt(x))):
    b = int(i**5 - x)
    if b > 0:
        b = b**0.2
    else:
        b = -((-b)**0.2)
    try:
        if b % 1 == 0:
            print(i, int(b))
            break
    except:
        pass
x=int(input())
for a in range(100):
    for b in range(-100,100):
        if (a**5 - b**5) == x:
            print(a,b)
            exit()
x = int(input())
d = [[0 for i in range(110)] for j in range(110)]
e = [[0 for i in range(110)] for j in range(110)]
for i in range(110):
    d[0][i] = i**5
    d[i][0] = i**5
for i in range(1,110):
    for j in range(1,110):
        d[i][j] = d[0][j]-d[i][0]
        e[i][j] = d[0][j]+d[i][0]
for m in range(110):
    if x in d[m]:
        print(d[m].index(x),m)
        break
    elif x in e[m]:
        print(e[m].index(x),-m)
        break
import bisect as bs
import sys

x = int(input())

dic = {}

i = 1
while True:
  dic[i ** 5] = i
  if i ** 5 >= 10 ** 10:
    break
    
  i += 1
  

for i in range(100):
  tmp = x + (i ** 5)
  if tmp in dic.keys():
    print(dic[tmp], i)
    sys.exit(0)
    
  tmp = x - (i ** 5)
  if tmp in dic.keys():
    print(dic[tmp], -i)
    sys.exit(0)
x = int(input())
for a in range(-100, 101):
    for b in range(-100, 101):
        if a ** 5 - b ** 5 == x:
            print(a, b)
            break
            break
X = int(input())
for a in range(10**2):
    B = a**5 - X
    b = B**-5
    if b % 1 == 0:
        print(str(int(a))+" "+str(int(b)))
        break
import sys
X = int(input())

for i in range(-100, 101):
    # print(i)
    for j in range(-100, 101):
        # print(i**5 - j**5)
        if (i**5 - j**5) == X:
            print(str(i) + ' ' + str(j))
            sys.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
X = int(input())
N = int(X**(1/5))
ans = [0,0]
for i in range(N+1):
  for j in range(-N, i+1):
    if i**5-j**5==X:
      ans = [i, j]
ans = [str(i) for i in ans]
ans = ' '.join(ans)
print(ans)
x = int(input())
for i in range(2000):
  for j in range(-100,1000):
    if i**5 - j**5 == x and x%(i-j) == 0:
      print(i,j)
      break
X=int(input())
i=1
while (X+(i**5))**(1/5)-int((X+(i**5))**(1/5))>10**(-8):
    i+=1
    if X<i:
        i=-1
        while (X+(i**5))**(1/5)-int((X+(i**5))**(1/5))>10**(-8):
            i-=1
        break
print("{} {}".format(int((X+(i**5))**(1/5)), i))
x = int(input())
a = x - 1
for i in range(0, a + 1):
    if pow(i, 5) == a:
        print(str(i) + " " + "-1")
X = int(input())
b = 0.0
c = True

while c:
    if (abs(X + b**5)**0.2).is_integer():
        c = False
        if X + b**5 > 0:
            a = int(abs(X + b**5)**0.2)
        else:
            a =  int( - 1 * (abs(X + b**5)**0.2))
    elif b == 0:
        b = 1.0
    elif b > 0:
        b = -1.0*b
    else:
        b = -1*b + 1
        
print(a, int(b))
n=int(input())
x= list(range(-64, 64, 1))
#print(x)
a = 100
b = 100
for i in x:
    for j in x:
        if i**5-j**5 == n:
            print(i, end=" ")
            print(j)
            exit()
from bisect import bisect_right as br
mem=[]
for i in range(101):
  mem.append(i**5)
#print(mem)

x=int(input())
idx=br(mem,x)
a=idx-1
x-=mem[idx-1]
#print(x)
idx1=br(mem,abs(x))
#print(idx1)
if x>0:
    b=idx1-1
else:
    b=-(idx1-1)
print(a,b)
x = int(input())
import math
for A in range(-10**5,10**5):
    A5 = A ** 5
    if x - A5 < 0:
        B = -1 *round(math.pow(-(x - A5),1/5),0)
    else:
        B = round(math.pow(x - A5,1/5),0)
    if  A5 == x + int(B) ** 5:
        print(A,int(B))
        quit()