peterverebics/CodeNet_Python_118 huggingface dataset:
x=int(input())

for a in range(x,0,-1):
    b=(a**5-x)
    if b<0:
        b=-(round(abs(b)**(1/5),7))
        if b.is_integer():
            b=int(b)
            print("{} {}".format(a,b))
            exit()

    else:
        b=(round(abs(b)**(1/5),7))
        if b.is_integer():
            b=int(b)
            print("{} {}".format(a,b))
            exit()
x = int(input())
lis = []
for i in range(-35,36):
    lis.append(i**5)
tab = [[0]*71 for _ in range(71)]
for j in range(71):
    for k in range(71):
        tab[j][k] = lis[j]-lis[k]
for l in range(71):
    for m in range(71):
        if tab[l][m] == x:
            print(l-35, m-35)
            exit()
s = int(input())
for i in range(0, s):
    for j in range(-s, s):
        if i**5-j**5 ==s:
            print(i, j)
            break
x=int(input())
l=[i**5 for i in range(-100,101)]
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-100,j-100)
            ok=True
            break
X = int(input())
A = -10
B = -10
for A in range(-10, 100):
    for B in range(-10, 100):
        if(A ** 5) - (B ** 5) != X:
            continue
        print(A, B)
        break
import sys

x = int(input())

for i in range(-100, 100):
    for j in range(-100, 100):
        if i ** 5 - j ** 5 == x:
            print('{} {}'.format(i, j))
            sys.exit()
X = int(input())
#a = int(X**0.2) + 2
if X == 0:
  print(0,0)
else:
  for i in range(-65,65):
    for j in range(-65,65):
      if i==j:
        continue
      else:
        if X%(i-j) == 0:
          if X == i**5 - j**5:
            print(i,j)
            exit()
def main():
	N = int(input())

	for a in range(0, 101, 1):
		for b in range(-101, a+1, 1):
			val = a**5 - b**5
			if(val == N):
				print(str(a) + " " + str(b))
				return

if __name__ == "__main__":
	main()
import sys
X = int(input())

for i in range(-100, 100):
    for j in range(-100, 100):
        cand = i ** 5 - j ** 5
        if X == cand:
            print(i, j)
            sys.exit()
x=int(input())
al=list(map(lambda x:-x, list(range(1,100))))
ar=list(range(100))
a=al+ar
b=a.copy()

for ai in a:
    for bi in b:
        if ai**5 - bi**5 == x:
            print("{0} {1}".format(ai,bi))
            exit()
import math
x = int(input())
a = round(math.pow(x,1/5))
a_five = a**5
if a_five-x < 0:
    b = int(math.pow((a_five-x)*-1,1/5))
    b *= -1
else:
    b = int(math.pow(a_five-x,1/5))
print(a)
print(b)
# D - I hate Factorization
def meet_condition(i, j):
	pi = pows[i]
	pj = pows[j]
	
	if pi - pj == x:
		return i, j
	elif pi + pj == x:
		return i, -j


pows = []

for i in range(100):
	pows.append(pow(i, 5))

x = int(input())

for i in range(len(pows)):
	for j in range(len(pows)):
		if meet_condition(i, j) != None:
			a, b = meet_condition(i, j)
			print(a, b)
			exit()
import math

x = int(input())

for i in range(-10 ** 2 - 11, 10 ** 2 + 11):
    for j in range(-10 ** 2 - 11, 10 ** 2 + 11):
        if i <= j:
            continue
        if i ** 5 - j ** 5 == x:
            print(i, j)
            exit()
import sys

readline = sys.stdin.readline
readlines = sys.stdin.readlines
ns = lambda: readline().rstrip() # input string
ni = lambda: int(readline().rstrip()) # input int
nm = lambda: map(int, readline().split()) # input multiple int 
nl = lambda: list(map(int, readline().split())) # input multiple int to list

x = ni()
tmp = 0
while True:
    add = (x + tmp ** 5) ** (1/5)
    sub = (x - tmp ** 5) ** (1/5)
    if add- round(add) < 10e-6:
        print(round(add), tmp)
        break
    if sub- round(sub) < 10e-6:
        print(round(sub), -tmp)
        break
    tmp += 1
X = int(input())

flag = False
for i in range(-10 ** 2, 10 ** 2):
  for j in range(-10 ** 2, 10 ** 2):
    if pow(i, 5) - pow(j, 5) == X:
      print(i, j)
      flag = True
      break
  if flag:
    break
"""
aを10^3くらいまででいいよね
"""
x = int(input())
# a>0 b>0のとき
for i in range(10**3):
    for j in range(i+1,10**3):
        if j ** 5 - i ** 5 == x:
            print(i,j)
            exit()
# a>0, b<0のとき
for i in range(10**2):
    for j in range(10**2):
        if i**5 + j**5 == x:
            print(i,-j)
            exit()
X = int(input())
for A in range(100):
    B5 = A**5-X
    for B in range(-100, 100):
        if B**5 == B5:
            print(A, B)
            exit()
import math

x = int(input())
for i in range(1, 121):
    b = x - i**5
    b = b**.2
    if math.ceil(b) - math.floor(b) < 1e6:
        print(i, int(b))
        exit(0)
import math
def main():

    X = int(input())
    v = int(pow(X, 0.25)) + 1
    for A in range(-v, v+1):
        c = pow(A, 5)
        for B in range(-v, v+1):
            if c - pow(B, 5) == X:
                return A, B
    return -1


if __name__ == '__main__':
    print(main())
import sys
input = sys.stdin.readline


def main():
    X = int(input().rstrip())
    f = 0
    for a in range(73):
        for b in range(64):
            i = a ** 5 - (-b) ** 5
            if i == X:
                print(a, -b)
                f = 1
                break

        if f:
            break


if __name__ == '__main__':
    main()
s = set()
table= {}
for i in range(100):
  s.add(i**5)
  table[i**5] = i
 
x = int(input())
for i in range(100):
  b5 = i**5
  if x-b5 in s:
    print(table[x-b5],-i)
  if x+b5 in s:
    print(table[x+b5],i)
X = int(input())

for i in range(-1000, 1000):
    for j in range(-10, 10):
        if i**5 - j**5 == X:
            print(i, j)
            exit()
import math
x = int(input())
i = 1
print(i)
while True:
  t = math.pow(i, 5)-x
  if t >= 0:
    b = math.pow(t, 1/5)
    if b.is_integer():
      print(str(i) + ' ' + str(int(b)))
      break
  else:
    b = math.pow(-t, 1/5)
    if b.is_integer():
      print(str(i) + ' ' + str(int(-b)))
      break
  i += 1
X=int(input())
l=[]
for y in range(1,X//2+2):
	if X%y==0:
		l.append(y)
K=len(l)
A=-1
for y in range(0,K):
	KKK=0
	A=0
	while KKK<X:
		A=A+1
		KKK=A**5-(A-l[y])**5
	if KKK==X:
		print(A,A-l[y])
		break
X = int(input())

#x^5-y^5=(x-y)(x^4+x^3y+x^2y^2+xy^3+y^4)

#for x in range(1, 121):
#  if ((x**5) - ((x-1)**5)) >= 1000000000:
#    print(x)

for a in range(0, 121):
  for b in reversed(range(-121, 120)):
    if b**5 == a**5-X:
      print(a, b)
      break
x=int(input())
for i in range(240):
  for j in range(240):
    if (120-i)**5-(120-j)**5==x:
      print(i,j)
      exit()
def main():
    X = int(input())
    for A in range(-50, 51):
        for B in range(-50, 51):
            if A**5 - B**5 == X:
                print(A, B)
                exit()
if __name__ == "__main__":
    main()
import sys
X = int(input())
b = 0
if X**(1/5) == int(X**(1/5)):
    print("{0} {1}".format(int(X**(1/5)),0))
    sys.exit(0)
b = 1
if (X+1)**(1/5) == int((X+1)**(1/5)):
    print("{0} {1}".format(int((X+1)**(1/5)),1))
    sys.exit(0)
b = -1
if (X-1)**(1/5) == int((X-1)**(1/5)):
    print("{0} {1}".format(int((X-1)**(1/5)),-1))
    sys.exit(0)
from sys import stdin
input = stdin.readline

X = int(input())

for i in range(-100, 101):
    for j in range(-100, 101):
        if pow(i, 5) - pow(j, 5) == X:
            print(i, j)
            exit()
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(-100000,100000):
  b = -k
  a = a_b + b
  if a**5 - b**5 == X:
    print(a,b)
    exit()
  elif -a**5 + b**5 == X:
    print(a,b)
    exit()
for k in range(-100000,100000):
  b = -k
  a = tmp + b
  if a**5 - b**5 == X:
    print(a,b)
    exit()
  elif -a**5 + b**5 == X:
    print(a,b)
    exit()
n=int(input())
for i in range(40):
    for j in range(40):
        if i**5-j**5==n:
            print(i,j)
            exit()
        if i**5+j**5==n:
            print(i,-j)
            exit()
x = int(input())
nums = []
i = 0
while i ** 5 <= 10 ** 10:
    nums.append(i ** 5)
    i += 1

for i in range(len(nums)):
    a5 = nums[i]
    for j in range(len(nums)):
        b5 = nums[j]
        if x == a5 - b5:
            print(i, j)
            exit()
        if x == a5 + b5:
            print(i, -j)
            exit()
import math
x = int(input())

xx = int(x ** (1/5))
for i in range(-xx, xx + 1):
    a5 = i ** 5
    b5 = a5 - x
    if b5 > 0:
        if b5 == int(b5 ** (1/5)):
            print(i, b5)
            break

    else:
        if (-1*b5) == int((-1*b5) ** (1/5)):
            print(i, b5)
            break
x = int(input())
for i in range(-100,100):
    for j in range(-100,100):
        if i**5-j**5==x:
            print(i,j)
            exit()
X = int(input())

A = X ** (1 / 5)
A = int(A)
A_ = A ** 5

B_ = X - A_

B = B_ ** (1 / 5)
B = int(B)
print(A, B)
x = int(input())
a = 1
b = 1
while True:
    if type((a**5 - x) ** 0.2) == complex:
        if ((x - a**5) ** 0.2).is_integer():
            b = -int((x - a**5) ** 0.2)
            break
        a += 1
        continue
    elif ((a**5 - x) ** 0.2).is_integer():
        b = int((a**5 - x) ** 0.2)
        break
    a += 1
print('{} {}'.format(a, b))
X = int(input())

cand = int(pow(X, 0.2))
diff = - (X - pow(cand, 5))

other = 0
for i in range(-cand, cand + 1):
    if diff == int(pow(i, 5)):
        other = i

print(cand, other)
X = int(input())

found = False
for a in range(-100, 100):
    if found: break;
    for b in range(-100, 100):
        if a ** 5 - b ** 5 == X:
            print(a, b)
            found = True
            break
X = int(input())
limit = int(X**0.2) + 1
for a in range(limit):
    b = -(X - a**5)**0.2
    if b.is_integer():
        print(a,int(b))
        break
x = int(input())
y = int(pow(x, 1/5))
A = [i**5 for i in range(y+1)]
B = [i**5 for i in range(y+1)]

for i in range(len(A)):
  for j in range(len(B)):
    if ( A[i] + B[j] ) == x:
      exit(print(i, j))
    elif ( A[i] - B[j] ) == x:
      exit(print(i, -j))
x = int(input())

for a in range(-120, 121):
    for b in range(-120, 121):
        if a**5 - b**5 == x:
            break

print(a, b)
def main():
    X = int(input())
    A = 1
    B = 0
    while A <= 100:
        for B in range(A-1, A*(-1)-1, -1):    
            x = A ** 5 - B ** 5
            # print(A, B, x)
            if x == X:
                print(A, B, sep=" ")
                return
        # break
        A += 1

if __name__ == "__main__":
    main()
X = int(input())
A = 0
B = 0
answer = 0
while answer != X:
    answer = A ** 5 - B ** 5
    if answer < X:
        A += 1
    if answer > X:
        B -= 1
        A -= 1
    print(A,B,answer)
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(-100,100):
    for j in range(-100,100):
        if (i**5)-(j**5)==x:
            print(i,j)
            fl=0
            break
    if not fl:
        break
def test2(x):
    t = int(pow((x//2),0.2))
    if(pow(t,5) == x):
        print(t,-t)
    else:
        j = -int(pow(x,0.2))
        i = int(pow((x + pow(j,5)),0.2))

        print(i,j)
        return()
# for i in range(1,100000):
#     test(i)
#     test2(i)


x = int(input())
test2(x)
x = int(input())
k = 1
while True:
    if k ** 5 - (k-1) ** 5 > x:
        break
    k += 1
print(k)
for a in range(k):
    amari = x - a ** 5
    for b in range(a+1):
        if amari == b ** 5:
            print(a, -b)
            break
        if amari == (-b) ** 5:
            print(a, b)
            break
import math

X = int(input())


def _pow(a, x):
    if a < 0:
        return -math.pow(-a, x)
    else:
        return math.pow(a, x)


pa = 0
while True:
    pb1 = _pow(pa ** 5 - X, 1 / 5)
    pb2 = _pow((-pa)**5 - X, 1 / 5)
    if pb1.is_integer():
        print(pa, int(pb1))
        exit()
    elif pb2.is_integer():
        print(-pa, int(pb2))
        exit()
    pa += 1
X = int(input())
x = 1
while ((x-1)**2)*9 < 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)
from math import floor
x = int(input())
k = 1
for i in range(2,x+1):
    if x % i == 0:
        k = i
        break

for a in range(floor(x ** (1/5)),x):
    b = a - k
    if a**5 - b**5 == x:
        print(a, b)
        break
X = int(input())

# for b in range(65, -64, -1):
for b in range(10000, -10000, -1):
    a = (X + b**5)**0.2
    # print('b a', b, a)
    if type(a) == complex:
        continue
    if a.is_integer():
        print(int(a), b)
        exit()
import math

import itertools

x = int(input())
all_a = [a ** 5 for a in range(-70, 70)]

for comb in itertools.combinations(all_a + all_a, 2):
    if comb[0] - comb[1] == x:
        a = int(math.pow(abs(comb[0]), 1 / 5))
        b = int(math.pow(abs(comb[1]), 1 / 5))

        if comb[0] < 0:
            a *= -1
        if comb[1] < 0:
            b *= -1

        print(a, b)
        exit()
import math

x = int(input())
uba = math.ceil(x**0.2) # ルート1/5

flag = False
for a in range(-uba-1, uba+1):
    for b in range(-uba-1, uba+1):
        s = a**5 - b**5
        if s == x:
            flag = True
            break
    if flag:
        break

print(a, b)
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
    else:
        continue
    break
else:
    print(-1)
import math
X = int(input())
N = int(X**(1/5))
for a in range(N+10):
    M = X-(a**5)
    if M < 0:
        continue
    M **= 1/5
    M = int(M)+10
    for b in reversed(range(M)):
        if a**5 + b**5 == X:
            print(a,-b)
            exit()
X = int(input())

for A in range(10**18):
    diff = X - A**5
    if diff < 0:
        minus_flg = False
        diff = abs(diff)
    else:
        minus_flg = True
    B = pow(diff, 0.2)
    if (isinstance(B, float)) and B.is_integer():
        break
if minus_flg:
    B = int(B)*-1
print(A, int(B))
import math
def D():
    X = int(input())
    for x in range(X):
        A = math.pow(x, 5)
        B = A-X
        ans = math.log(abs(B), 5)
        if B == 0 or ans.is_integer():
            print(int(x), int(ans))

D()
x = int(input())

num = [x ** 5 for x in range(-63, 63)]


for i in range(-63, 63):
    flag = False
    for j in range(-63, 63):
        tmp = i ** 5 - j ** 5
        if tmp == x:
            print('{} {}'.format(i, j))
            flag = True
            break
    if flag:
        break
x=int(input())
for i in range(-200,200):
    for j in range(-200,200):
        if i^5-j^5==x:
            print(i,j)
            exit()
X=int(input())
a=True
for A in range(118+119):
    if(a):
        for B in range(118+119):
            if((A-118)**5-(B-118)**5==X):
                print(A-118,B-118)
                a=False
                break
n = int(input())
 
a = [i**5 for i in range(120)]
for i in range(119):
    for j in range(i+1,119):
        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())

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


if __name__ == '__main__':
    q4()
x = int(input())
flag = False
for a in range(0, 100):
  for b in range(-100, 1000):
    if a**5-b**5 == x:
      print(a, b)
      flag = True
      break
  if flag:
    break
X = int(input())

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


def foo():
    for i in range(1000):
        for j in range(i, 1000):
            if go[i] - go[j] == X:
                return i, j
        for j in range(1000):
            if go[i] + go[j] == X:
                return i, -j

    return 0, 0


A, B = foo()
print(A, B)
X = int(input())

for i in range(2,10**5):
    if i ** 5 - (i-1)**5 == X:
        print(i,i-1);exit()


for x in range(0,150):
    for y in range(-150,0):
        if x** 5 - y ** 5 == X:
            print(x,y);exit()
x = int(input())
for i in range(-120, 120):
  for j in range(-120, 120):
    if i**5-j**5 == x:
        print(i, j)
        break
X = int(input())

for a in range(0, 10**9):
    bb = X - a**5
    B = bb**0.2

    if isinstance(B, float):
        if B.is_integer():
            print(a, int(B))
            break

    a *= -1
    bb = X - a**5
    B = bb**0.2
    if isinstance(B, float):
        if B.is_integer():
            print(a, int(B))
            break
hoge = {}
for i in range(100):
    hoge[i] = i**5
for i in range(100):
    hoge[-i] = -i**5
x = int(input())
for i in hoge.items():
    for j in hoge.items():
        if i[1] - j[1] == x:
            print(i[0], j[0])
            break
    else:
        continue
    break
def get_answer():
  x = int(input())
  
  is_get = False
  for a in range(1000000000):
    if is_get:
      break
    for b in range(-1*a, a, 1):
      if x == a**5 - b**5:
        is_get = True
        break
        
  print(f"{a-1} {b}")
x = int(input())
i = 2
j = 1
while x > i ** 5:
    if x % (i ** 5) == 0:
        j *= i
        x //= i ** 5
        i = 2
    else:
        i += 1
else:
    y = x // j
    for a in range(int(y ** 0.2) + 1):
        b = int((a ** 5 - y).real)
        if a ** 5 - b ** 5 == y:
            print(a * j, b * j)
            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)
            break
x = int(input())
ans = [i**5 for i in range(66)]
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())
y = []
count1 = 0
flag = 0
for i in range(0, 70):
  y.append(i*i*i*i*i)
for i in y:
  if i == x:
    print("0 -" + str(count1))
    flag = 1
    break;
  count1 += 1
count1 = 0
for i in y:
  if flag == 1:
    break;
  count2 = 0
  for j in y[:count1]:
    y2 = i + j
    y3 = i - j
    if y2 == x:
      print(str(count1) + " -" + str(count2))
      break;
    if y3 == x:
      print(str(count1) + " " + str(count2))
      break;
    count2 +=1
  count1 += 1
X=int(input())

d5=[0]*(101)
for i in range(101):
    d5[i]=i**5


for i in range(101):
    for j in range(101):
        ans1=d5[i]-d5[j]
        if ans1==X:
            print(i,j)
            exit()
        ans2=d5[i]+d5[j]
        if ans2==X:
            print(i,(-1)*j)
            exit()
N = int(input())


B = -1


import math
#A = math.sqrt(N+B^2)
A = math.pow(N-1, 1/5)


print(int(A),B)
x=int(input())
a=1
for i in range(2,x):
  if x%i == 0:
    b1=a-i
    b2=a-x//i
    break
else:
  b1=0
  b2=0

if a**5-b1**5 == x:
  print(a,b1)
elif a**5-b2**5 == x:
  print(a,b2)
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
import math
x = int(input())

# -100 ~ 100 ^ 5
pow5 = {}
for i in range(-100, 101):
    pow5[i] = int(math.pow(i, 5))

for i in range(-100, 101):
    a = x + pow5[i]
    for j in range(-100, 101):
        if a == pow5[j]:
            print(j, i)
            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)
            break
x = int(input())
a = 0
b = 0

for i in range(100):
    if(i**5) >= x:
        if(i**5)-x > x-((i-1)**5):
            a = i-1
        elif(i**5)-x <= x-((i-1)**5):
            a = i
        break

print(a)

B = (a**5) - x
b = B//5
print(a,b, sep=" ")
import numpy as np
x = int(input())

i = 0
while True:
    a = i
    b = (np.abs(a**5 - x))**(1/5)
    print(b)
    if (a**5-x) < 0 :
        b = -b
    if a**5 - int(b)**5 == x:
        print(a,int(b))
        break
    
    a = -i
    b = (np.abs(a**5 - x))**(1/5)
    if (a**5-x) < 0 :
        b = -b
    if a**5 - int(b)**5 == x:
        print(a,int(b))
        break
    i += 1
X = int(input())
a = int(X**0.2) + 1
if X == 0:
  print(0,0)
else:
  for i in range(0,a+1):
    for j in range(0,-(a+1),-1):
      if i==0 and j==0:
        continue
      else:
        if X%(i-j) == 0:
          if X == i**5 - j**5:
            print(i,j)
            exit()
x=int(input())
a=int(x**0.2)
a2=a+1
b=int((x-a**5)**0.2)
b2=b
if (x-a2**5)>0:
    b2=x-a2**5
b2=int(b2**0.2)
y=a**5-b**5
if y==x:
    print(a,b)
elif a2**5-b2**5==x:
    print(a2,b2)
elif a**5+b**5==x:
    print(a,-b)
elif a2**5+b2**5==x:
    print(a2,b2)
import itertools

X = int(input())

u = -64
A = []
while u < 65:
    A.append(u)
    u += 1
AA = list((itertools.product(A, repeat=2)))
for a,b in AA:
    if a**5-b**5 == X:
        print(a,b)
        break
x=int(input())
for i in range(-int(x**0.2),int(x**0.2)):
    for j in range(-int(x**0.2), int(x**0.2)):
        if i**5-j**5==x:
            print(f"{i} {j}")
            break
x = int(input())

ok = False
for a in range(101):
    for b in range(-100, 101):
        if a**5 - b**5 == x:
            print("%d %d" % (a, b))
            ok = True
        if ok:
            break
    if ok:
        break
X =int(input())
A = 0
B = 0
AA = 0
for i in range(1,X+1):
    A = i **5
    if AA != 0:
        break
    for j in range(0,i):
        B = j **5
        if abs(A-X) < B:
            break
        if abs(A-X) == B:
            AA = i
            AB = j
            break
if X - A < 0:
    AB = -AB
print(AA,AB)
def main():
    import sys
    input = sys.stdin.readline

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


if __name__ == "__main__":
    main()
x=int(input())
for a in range(-400,400):
    for b in range(-400,400):
        if a^5-b^5==x:
            break
    if a^5-b^5==x:
        break
print(a,b)
import sys
input=lambda: sys.stdin.readline().rstrip()
x=int(input())
A=[int(i) for i in range(201)]
Ans=[]
for a in A:
  for b in A:
    if a**5+b**5==x and not Ans:
      Ans=[a,-b]
    if a**5-b**5==x and not Ans:
      Ans=[a,b]
print(*Ans)
print(200**5)
X = int(input())
B=-1
tmp = X
i=0
flg=0
while True:
    tmp = tmp + B**5
    A = int(tmp**.2)
    if A**5==tmp:
        break
    B -= 1
    tmp = X
    i+=1
    if i>40:
        flg=1
        break
if flg==1:
    A=1
    while True:
        tmp = tmp + A**5
        B = int(tmp**.2)
        if B**5==tmp:
            break
        A += 1
        tmp = X
        
print(A, B)
X = int(input())
N1 = 0
N2 = 0

A = [0] * 80
for i in range(80):
    A[i] = (i-39)**5

for i in range(80):
    for j in range(80):
        if A[i] - A[j] == X:
            N1 = i-39
            N2 = j-39
            break

print(N1,N2)
def main():
    x = int(input())
    a, b = 1, 0

    while True:
        for b in reversed(range(-a + 1, a)):
            print(a, b)
            q = a**5 - b**5
            if q == x:
                print(f'{a} {b}')
                return
        a += 1

main()
x = int(input())

for a in range(-100, 100):
    for b in range(-100, 100):
        if (a ** 5 - b ** 5 == x):
            print(f"{a} {b}")
            exit()
x=int(input())
if x >= 0:
  a=round(pow(x, 0.2))
  if x>a**5:
    b=-1*int(pow(x-a**5, 0.2))
  else:
    b=int(pow(a**5-x, 0.2))
else:
  b=round(pow(-x, 0.2))
  if -x>b**5:
    a=-1*int(pow(-x-b**5, 0.2))
  else:
    a=int(pow(b**5+x, 0.2))
print(a, b)
import sys
X=int(input())
b_s=-1*int(X**(1/5))
for B in range(b_s,10**6):
    A=(B**5+X)**(1/5)
    if A.is_integer():
        print('{} {}'.format(int(A),B))
        sys.exit()
import math
X = int(input())
rX = math.floor(X ** (1/5))
for i in range(0 - rX, rX):
        A5 = 0
        A5 = X + (i ** 5)
        A = A5 ** (1/5)
        # print(type(A))
        if type(A) is float:
                if A.is_integer() is True:
                        A = int(A)
                        print(i, A)
                        break
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())

for a in range(-100,100):
    for b in range(-100,100):
        if (int(a ** 5 - b ** 5)) == X:
            print(a,b) 
            exit(0)
X = int(input())
print(int((X-1)**(1/5)), -1)
x =int(input())

for A in range(-118,120):
    for B in range(-119,119):
        if (A**5-B**5)==x:
            print("%d %d" %(A,B))