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

def gen_divisor(x):
    for i in range(x + 1, 1):
        if x % i == 0:
            yield i

def gen_candidates(limit, divisor):
    for a in range(limit):
        yield (a, a - divisor)


for divisor in gen_divisor(x):
    for a, b in gen_candidates(x + 1, divisor):
        if a**5 - b**5 == x:
            print(a, b)
            break
    else:
        continue
    break
# coding:utf-8
import itertools
x = int(input())
a = 0
b = 0
num_list = [i**5 for i in range(40, -39, -1)]
combi = list(itertools.combinations(num_list, 2))


for item in combi:
    # print(item)
    if item[0] - item[1] == x:
        #print(item[0], item[1])
        a = int(item[0] ** (1 / 5))
        b = int((-item[1]) ** (1 / 5))
        break


print(a, -b)
def test2(x):
    t = int(pow((x//2),0.2))
    if(pow(t,5) == x):
        print(t,-t)
        return()
    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())
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()
import math
def main():
  x = int(input())
  r = range(-100,100)
  for i in r:
    for j in r:
      if math.pow(i, 5) - math.pow(j, 5) == x:
        print(str(i) + ' ' + str(j))
        return
main()
import sys
stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)

def LI(): return list(map(int, stdin.readline().split()))
def LS(): return list(stdin.readline())

x = int(input())
a = [i**5 for i in range(-100, 100)]
b = a.copy()
for i in a:
    for j in b:
        if j-i==x:
            print(i, j)
            sys.exit()
x = int(input())
a = -10
b = -10
for i in range(100):
    b = -10
    for j in range(100):
        if (a**5 - b**5) == x:
            print(a, b)
            exit()
        b += 1
    a += 1
x = int(input())
print(x)
a = 0
b = 0
for i in range(500):
  for j in range(-500, 500):
    if i**5 - j**5 == x:
      a = i
      b = j
      break
print("{0} {1}".format(a, b))
x = int(input())

lower = -1
upper = -1
for i in range(10000):
    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(-a-1, a+1):
        if a5 - pow(b, 5) == x:
            print(a, b)
            exit(0)

# 0, 0
print(0, 0)
import math

X = int(input())

a = 1
while a < math.pow(X, 1.0/5.0):
    a *= 10

b = a - 1
while a > 0:
    b = -a
    while b < a:
        if a**5 - b**5 == X:
            print(a, b)
            exit()
        b += 1
    a -= 1
x=int(input())
a=[]
for i in range(0,200):
  a.append(i**5)
for i in range(0,len(a)):
  for j in range(i,len(a)):
    if((a[i]**5-x)==a[j]):
      print(j,i)
    elif((x-a[i]**5)==a[j]):
      print(j,-i)
import sys
X = int(input())
MAX = 2*(10**9)
MOD = 10**9+7
M = [i for i in range(0, 100)]
def function(a, b):
  return (a-b)*(a**4 + (a**3) * b + (a**2) * (b**2) + a * (b**3) + b**4)
for i in M:
  for j in M:
    for m in [-1, 1]:
      for n in [-1, 1]:
        if function(i*m, j*n)%MOD == (X)%MOD:
          print(i*m, j*n)
          sys.exit(0)
x=int(input())

for i in range(-100, 101):
    a=i
    for j in range(-100, 101):
        b=j
        if a**5 -b**5==x:
            print(a, b)
            exit()
x = int(input())
import math
for i in range(1000000):
    a = x - i ** 5
    #print("a", a)
    if a > 0:
        v = math.pow(a, 1.0/5.0)
        if v.is_integer():
            #print("hit")
            print(i, int(v))
            break
    else:
        v = math.pow(-a, 1.0 / 5.0)
        if v.is_integer():
            print("hit")
            print(i, int(-v))
            break
x=int(input())
a5=[0]
for i in range(1,200):
  a5.append(i**5)
#
r=0
for i in range(200):
  for j in range(i+1,200):
    if a5[j]-a5[i]>x:
      break
    if a5[j]-a5[i]==x:
      print(i,j)
#
x=int(input())

for i in range(int(x**0.2*2)):

    sign=1
    b=(i**5-x)

    if b<0:
        sign=-1
    b=sign*((b*sign)**0.2)
    
    if b==int(b):
        print(i,int(b))
        break
X = int(input())

for i in range(-100, 101):
    for j in range(-100, 101):
        if i**5 - j**5 == X:
            print(i, j)
            exit()
from math import ceil
x = int(input())
n = 10 ** 9
for a in range(ceil(x ** 0.2), n):
    b = (a ** 5 - x) ** 0.2
    if b == int(b):
        b = int(b)
        break
print(a, b)
x = int(input())
s = -(int(x**0.2)-1)
g = int(x**0.2)+1
for i in range(s,g):
    r = i**5 + x
    if (r**0.2)%1 == 0:
        print(-i,-int(r**0.2))
        exit()
import sys
X=int(input())
l=[i**5 for i in range(1000)]
for i in range(1000):
    for j in range(-999,0):
        if l[i]+l[j*-1]==X:
            print(i,j)
            sys.exit()
    for j in range(i):
        if l[i]-l[j]==X:
            print(1,l[i],l[j])
            print(i,j)
            sys.exit()
X = int(input())

for i in range(-130, 130):
    for j in range(-130, 130):
        if X == i ** 5 + j ** 5:
            print(i, j)
x = int(input())
import math
for i in range(1000000):
    a = x - i ** 5
    #print("a", a)
    if a > 0:
        v = math.pow(a, 1.0/5.0)
        if v.is_integer():
            #print("hit")
            print(int(v), -i)
            break
    else:
        v = math.pow(-a, 1.0 / 5.0)
        if v.is_integer():
            print("hit")
            print(int(v), i)
            break
from copy import deepcopy
from sys import exit,setrecursionlimit
import math
from collections import defaultdict,Counter,deque
from fractions import Fraction as frac
import fractions
from functools import reduce
from operator import mul
import bisect
import sys
import logging
import heapq
import itertools

logging.basicConfig(level=logging.ERROR)

#input = sys.stdin.readline

setrecursionlimit(1000000)


def main():
    x = int(input())
    for a in range(-10,11):
        for b in range(-10,11):
            if(a**5-b**5 == x):
                print(a,b)
                return

main()
x = int(input())


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


# b>0

for i in range(0,int(x**(1/5)+1)):
    for j in range(int(-x**(1/5)),0):
        if i**5 - j**5 == x:
            print(i,j)
            #break
X = int(input())
A = 0
B = 0
for i in range(10 ** 2):
    for j in range(- 10 ** 2, 10 ** 2):
        if i ** 5 - j ** 5 == X:
            A = i
            B = j
print(A, B)
x=int(input())
a=[]
for i in range(0,500):
  a.append(i**5)
for i in range(0,len(a)):
  for j in range(0,len(a)):
    if(a[i]+a[j]==x):
      print(j,i)
      break
    elif((x-a[i])==a[j]):
      print(j,-i)
      break
  else:
    continue
  break
import sys
import itertools


x = int(input())
for a in itertools.count():
    for b in itertools.count(a):
        a5b5 = b**5 - a**5
        if a5b5 == x:
            print(a, -b)
            sys.exit(0)
        if x < a5b5:
            break
x = int(input())
b = -1
a = x + b**5

print(a, b)
x = int(input())

lim = 10000000000
d = dict()
i = 0
cand = 0
while(cand <= lim):
    cand = i ** 5
    d[cand] = i
    i += 1

for k, v in d.items():
    if (x-k) in d:
        print(d[x-k], -v)
        break
    elif (x+k) in d:
        print(d[x+k], v)
        break
x,r=int(input()),range(-99,99);[i**5-x-j**5or exit(print(i,j))for i in r for j in r]
X = int(input())

# Aの数は10**4個ある
# そして二分探索する

nums = [0]
n = 1
while ((n**5) - ((n - 1)**5)) <= X * 2:
    nums.append(n**5)
    n += 1
# print(nums)
ans = None
for num in nums:
    if X - num in nums:
        ans = (num, -(X - num))
        break
    elif X + num in nums:
        ans = (num, X + num)
        break
if ans:
    print(*ans)
x=int(input())
i=1
while(True):
   check=pow(i,5)
   diff=abs(x-check)
   
   val=pow(diff,0.2)
   if(int(val)==val):
       print(i,-int(val))
       break
   i+=1
#print(diff)
x = int(input())
b = -1
a = x + b**5
print(a, b)
x = int(input())
print(x)
a=0
b=0
for i in range(-400,400):
    for j in range(-400,400):
        if i**5 - j**5 == x:
            a = i
            b = j
            break

print(a,b)
# -*- coding: utf-8 -*-
X = int(input())

ans = ""
for i in range(70):
    for j in range(-70, i, 1):
        if i ** 5 - j ** 5 == X:
            ans = "{} {}".format(i, j)
            break
    if ans != "":
        break
print(ans)
n = int(input())
nn = int(pow(n,1/5)) + 2
for i in range(-nn,nn):
    cheak = i ** 5 - n
    if cheak < 0:
        b = -1 * pow(abs(i ** 5 - n), 1/5)
    else:
        b = pow(abs(i ** 5 - n), 1/5)
    if type(b) is float:
        if float.is_integer(b):
            break

print(i,int(b))
# D - I hate Factorization

X = int(input())

fact = []
for i in range(101):
    fact.append(pow(i,5))

for i in range(101):
    for j in range(101):
        if fact[j]-fact[i]==X:
            print(j, i)
            break
        elif fact[j]+fact[i]==X:
            print(j, -i)
            break
    else:
        continue
    break
def main():
    X = int(input())

    for A in range(-100, 100):
        for B in range(-100, 100):
            if A**5 - B**5 == X:
                print(A, B)
                return


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

AA = 0
BB = 0

for A in range(121):
    for B in range(121):
        if X == (A ** 5) - (B ** 5):
            AA = A
            BB = B

        if X == (A ** 5) - (-B ** 5):
            AA = A
            BB = B

print(AA,BB)
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(m,-d[m].index(x))
        break
    elif x in e[m]:
        print(m,e[m].index(x))
        break
x = int(input())
n = 70
posi = [pow(i, 5) for i in range(n)]
nega = [pow(i, 5) for i in range(0, -n, -1)]
flag = False
for i in range(n):
    for j in range(n):
        if posi[i] - nega[j] == x:
            print(i, -j)
            flag = True
            if flag:
                break
    if flag:
        break
from decimal import Decimal
n = int(input())
nn = int(pow(n,1/5)) + 1
for i in range(-nn,nn):
    cheak = i ** 5 - n
    ans = float(pow(Decimal(abs(cheak)), Decimal("0.2")))

    if type(ans) is float:

        if ans.is_integer():
            if cheak < 0:
                b = -1 * ans
            else:
                b = ans
            print(i,int(b))
            break
X = int(input())
for i in range(-100, 100):
    A = pow(i, 5)
    for j in range(-100, 100):
        B = pow(j, 5)
        if A-B == X:
            print(i, j)
            exit(0)
x=int(input())
value=0
index=0
hashmap=dict()
while value<int(1e18)+1:
    value=pow(index,5)
    hashmap[value]=index
    index+=1
#print(hashmap)    

for i in range(1,64):
    b1=x+int(pow(i,5))
    b2=x+int(pow(-i,5))
    if hashmap.get(b1)!=None:
        print(hashmap[b1],i)
        break
    if hashmap.get(abs(b2))!=None:
        print(hashmap[abs(b2)],-i)
        break
X = int(input())

for i in range(0,1000):
    for j in range(0,1000):
        if i!=j and X % abs(i-j) == 0:
            if i**5 - j**5 ==X:
                print(i,j)
                exit()
            if i**5 + j**5 ==X:
                print(i,-j)
                exit()
import itertools
x = int(input())
num = [i**5 for i in range(1000)]
ans= list(itertools.combinations_with_replacement(num, 2))
for i in ans:
    if abs(i[0]-i[1]) == x:
        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
from sys import stdin, stdout
import math
import bisect
import re

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

for a in range(-100, 100):
    for b in range(-100, 100):
        if a ** 5 - b ** 5 == x:
            stdout.writelines(str(a) + ' ' + str(b) + '\n')
            exit(0)
x=int(input())
a=int(x**0.2)
b=int((x-a**5)**0.2)
print(a,-b)
import math
x = int(input())
for b in range(-100000, 100000):
    v = b ** 5 + x
    p = pow(v, 0.2)
    if p == p.real:
       print(int(pow(v, 0.2)), b)
       break
X = int(input())
A = -1
Flg = True
while Flg:
    A += 1
    Y1 = X + A**5
    Z1 = Y1**(1/5)
    Y2 = X - A**5
    if Y2 > 0:
        Z2 = Y2**(1/5)
    else:
        Z2 = 0.5
    if Z1.is_integer():
        B = Z1
        Flg = False
    elif Z2.is_integer():
        B = -Z2
        Flg = False
    else:
        pass
print(int(A),int(B))
x = int(input())
n = 10
posi = [pow(i, 5) for i in range(n)]
nega = [pow(i, 5) for i in range(0, -n, -1)]
flag = False
for i in range(n):
    for j in range(n):
        if posi[i] - nega[j] == x:
            print(i, -j)
            flag = True
            if flag:
                break
    if flag:
        break
x  = int(input())
a = 1
if x < 1:
    a += x
b = (-1) ** 4/5 * (a ** 5 - x) ** 1//5


print(a , int(b))
x = int(input())
#n, k = list(map(int, input().split()))
# a, b, c = list(map(int, input().split()))
#a = 0
#b = 0
for a in range(0, 1000):
    for b in range(0, 100):
        if pow(a, 5)-pow(b, 5) == x:
            print(a, end=" ")
            print(b)
            exit()
        elif pow(a, 5)-pow(b*-1, 5) == x:
            print(a, end=" ")
            print(b*-1)
            exit()
x=int(input())
a = 0
b = 0

for i in range(100):
    for j in range(1,100):
        tmp = (i*i*i*i*i) + (j*j*j*j*j)
        if x == tmp:
            a = i
            b = -j
            break

for i in range(100):
    for j in range(1,100):
        tmp = (i*i*i*i*i) - (j*j*j*j*j)
        if x == tmp:
            a = i
            b = j
            break

print(a,b)
x = int(input())

for i in range(-100,100):
    for j in range(-100,100):
        if x == i**5 - j **5:
            print(i,j)
            exit()
X = int(input())
A = 0
B = 0

for a in range(int(X ** 0.25 - 1), X + 1):
    b = - (X - a ** 5) ** 0.2

    if b.imag == 0.0 and b == int(b):
        A = a
        B = b
        break

print(str(A) + " " + str(B))
x=int(input())
a=0
b=0
for i in range(-x,x):
  for j in range(-i,x):
    if i**5-j**5==x:
      a=i
      b=j
      break
  else:
    continue
  break
print(a,b)
from numba import jit
X = int(input())


@jit
def solver(X):
    i = 2
    while X % i != 0:
        i += 1
    return i


if X == 1:
    print(0, -1)
    exit()

sol = solver(X)
for i in range(-10, 10):
    j = i - sol
    if (i ** 5 - j ** 5) == X:
        print(i, j)
        break
x = int(input())
for a in range(-500,500):
    for b in range(500):
        if a**5-b**5==x or b**5-a**5==x:
            print(a,b)
            exit()
x = int(input())
a = 0
b = 0

for a_ in range(3):
    _ = a_**5 - x
    b_ = _**0.2
    if a_**5 - b_**5 ==x:
        a = a_
        b = _
        
print(a, b)
from math import sqrt, log, pow
num = [i**5 for i in range(-1, 121)]
X = int(input())
c = 0
for i in range(len(num)):
    a = num[i]
    for j in range(i+1):
        if a - num[j] == X:
            print(i-1, j-1)
            exit()
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:
        if a.imag != 0:
            continue
        print(int(a.real), b)
        exit()
    elif a.is_integer():
        print(int(a), b)
        exit()
import math

X = int(input())

a = 1
while a < math.pow(X, 1.0/5.0):
    a *= 10

while a > 0:
    b = a - 1
    if a**5 - b**5 > X:
        a -= 1
        continue
    while a**5 - b**5 <= X:
        if a**5 - b**5 == X:
            print(a, b)
            exit()
        b -= 1
    a -= 1
X = int(input())

A = 0
B = 0
while True:
    a = A**5
    temp = a - X
    temp = abs(temp)
    B = temp**(1/5)
    if type(B) != complex:
        if B.is_integer():
            B = int(B)
            break
    A += 1

if A**5 - B**5 == X:
    print(A, B)
else:
    print(A, -B)
X = int(input())
for A in range(65):
  for B in range(65):
    if (A**5) - (B**5) == X:
      print("{} {}".format(A,B))
      exit()
    elif ((-1*A)**5) - (B**5) == X:
      print("{} {}".format(-1*A,B))
      exit()
    elif (A**5) - ((-1*B)**5) == X:
      print("{} {}".format(A,-1*B))
      exit()   
    elif ((-1*A)**5) - ((-1*B)**5) == X:
      print("{} {}".format(-1*A,-1*B))
      exit()
x = int(input())
start = int(pow(x,0.2))
for i in range(-start,start+1):
    k = pow(x + pow(i,5),0.2)
    k = round(k,8)
    #print(i,k)
    if pow(int(k),5) - pow(i,5) == x:
        print(int(k),i)
        exit()
X=int(input())

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

for a in range(-60, 60):
    for b in range(-60, 60):
        if a**5 - b**5 == x:
            print(a, b)
            quit()
from copy import deepcopy
from sys import exit,setrecursionlimit
import math
from collections import defaultdict,Counter,deque
from fractions import Fraction as frac
import fractions
from functools import reduce
from operator import mul
import bisect
import sys
import logging
import heapq
import itertools

logging.basicConfig(level=logging.ERROR)

#input = sys.stdin.readline

setrecursionlimit(1000000)


def main():
    x = int(input())
    for a in range(-100,101):
        for b in range(-100,101):
            if(a**5-b**5 == x):
                print(a,b)
                return

main()
import math

X = int(input())

for i in range(-100, 100):
  for j in range(-100, 100):
    if	math.pow(i, 5) - math.pow(j, 5)	== X:
      print("%d %d" % (i, j))
      exit()
import math
x=int(input())

def calc(x):
    return x ** (1/5)
def calcRev(x):
    return x ** 5

n = int(calc(x))
a = calcRev(n) - x
retn = calcRev(n)
reta = calcRev(a)
ret = retn - reta
if ret == x:
    print(n, a)
import math

x = int(input())
r = math.ceil(math.log(x, 5))
for a in range(-r,r + 1):
    bb = a ** 5 - x
    if bb < 0:
        b = -1
    else:
        b = 1
    bbb = b ** 0.2
    b *= int(bbb.real + bbb.imag)
    if a ** 5 - b ** 5 == x:
        print(a,b)
        break
x = int(input())
print(x)
a=0
b=0
for i in range(-400,400):
    for j in range(-400,400):
        if i**5 - j**5 == x:
            a = i
            b = j
            exit

print(a,b)
kai = int(input())
for x in range(-10,kai):
    for y in range(-10,kai):
        if x**5 - y**5 == kai:
            print(x,y)
x = int(input())
i = 0
while i**5 < x and (i + 1)**5 < x:
    i += 1
tmp1 = i ** 5
rest1 = x - tmp1
j = 0
start, end = 0, rest1
while start <= end:
    middle = (start + end)//2
    if tmp1 + middle ** 5 > x:
        end = middle - 1
    elif tmp1 + middle ** 5 == x:
        print(i, -middle)
        break
    else:
        start = middle + 1
x = int(input())
top = int(x**0.5)+1
A = 0
B = 0
flag = False

divs = []
for i in range(1, top):
    if x % i == 0:
        divs.append(i)

for d in divs:
    if flag:
        break
    for i in range(-d, d+1):
        a = i
        b = a - divs[-1]
        if a**5 - b**5 == x:
            A = a
            B = b
            flag = True
            break

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

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

        if -aa == pow(b,5):
            print(a,-b)
            exit()
x=int(input())
for i in range(-40,40):
    for j in range(-40,40):
        if i**5-j**5==x:
            print(i,j)
            exit()
import math
import sys

x = int(input())

for i in range(int((10**9)/2)+1):
    if x-i**5 < 0:
        flag = 1
        b = math.pow(-(x - i ** 5), 1.0 / 5.0)
    else:
        b = math.pow((x-i**5), 1.0/5.0)
        flag = 0
    if b.is_integer():
        if flag == 1:
            print(i, -int(b))
        else:
            print(i, int(b))
        sys.exit()
x=int(input())
for i in range(-70,71):
  for j in range(-70,71):
    if(pow(i,5)-pow(j,5)==x):
      print(i,j)
      exit()
x,r=int(input()),range(-999,9);[i**5-x-j**5or exit(print(i,j))for i in r for j in r]
X = int(input())

i = 0
y = 0
S = [0]
a = 0
b = 0

while y == 0:
  i = i + 1
  S.append(i**5)
  if abs(S[i-1]-X) <= abs(S[i]-X):
    y = 1
  
for j in range(len(S)-1):
  if S[i-1] - S[j] == X:
    a = i-1
    b = j
  if S[i-1] + S[j] == X:
    a = i-1
    b = -j

print(a,b)
#d
d=int(input())
for i in range(-100,101):
    for j in range(-100,101):
        if i**5-j**5==d:
            break
            break
ans=[]
ans.append(int(i))
ans.append(int(j))
print(*ans)
x = int(input())
for i in range(-50,50):
    for j in range(-50,50):
        if i**5 - j**5 == x:
            print(i,j)
            exit()
X = int(input())
for a in range(100):
    for b in range(-100,100):
        if a**5 - b**5 == X:
            print(a,b)
            break
    else:
        continue
    break
X = int(input())
for A in range(-100, 100+1):
  for B in range(-100, 100+1):
    if A*A*A*A*A-B*B*B*B*B == X:
      print(A, B)
      exit()
print(-1)
n = int(input())
m = n % 10

judge = False
if m == 0:
  n = n // 10**5
  m = n % 10
  judge = True
  
def calc(a, b):
  return a**5 - b**5
  
lst = []
for i in range(-1000, 1000):
  lst.append(calc(i+m, i))
  
for i in range(0, 2000):
  if lst[i] == n:
    if judge:
      print((i - 1000 + m)*10, (i - 1000)*10)
    else:
      print(i - 1000 + m, i - 1000)
    break
x = int(input())

for a in range(0,x):
  b = (a ** 5 - x)
  if b < 0:
    b = -(abs(b)**(1/5))
  else:
    b = b**(1/5)
  if a**5-b**5==x:
     b = int(b)
     print(a,b,sep = ' ')
     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)
            exit()
x = int(input())
import math
f = 1
for A in range(0,10**6):
    A5 = A ** 5
    if x - A5 > 0:
        f = -1
        B = int(math.pow(x - A5,1/5))
    else:
        B = int(math.pow(-(x - A5),1/5))

    if B ** 5 + A5 == x:
        print(A,B*f)
        quit()
X=int(input())

for i in range(1000):
    for j in range(1000):
        j *= -1
        if X == (i**5-j**5):
            print(i, j)
            exit()
x = int(input())
a = 0
b = 0
for i in range(121):
    tmp = (i ** 5 - x)
    flag = True
    #負の値でFalse
    if tmp < 0:
        flag = False
    b_kouho = abs(tmp) **(1/5)
    if (b_kouho).is_integer():
        a = i
        b = -1 * b_kouho
        if flag:
            b *= -1
        break
print("{} {}".format(int(a),int(b)))
i=int(input())
f=0
for j in range(-1000,1001):
    for k in range(j,1001):
        if j**5-k**5==i and j**5-k**5==-i:
            print(j, k)
            f=1
            break
    if f==1:
        break
from math import trunc

X = int(input())
P = 5

A = trunc(X ** (1/P))

for a in reversed(range(0, A + 1)):
    for b in (A * -1 + 1, A):
        if (a + b) == 0:
            continue

        if X % (a + b) == 0:
            break
    else:
        continue

print("%i %i" % (a, b))
X = int(input())
C= [i**5 for i in range(119)]

a = 0
b = 0

for a in range(len(C)):
    for b in range(len(C)):
        if C[a] + C[b] == X:
            print(a, -b)
            exit(0)
        elif C[a] - C[b] == X:
            print(a, b)
            exit(0)
# coding: utf-8
# Your code here!
import math
X = int(input())

a = X**(1/5)

a = math.floor(a)

if a > 0:
        
    
    b = (a**5 - X)**(1/5)
    print(-a,round(abs(b)))
    
if a < 0:
        
    
    b = (-1)**(2/5)*(-X + a**5)**(1/5)
    print(a,-round(abs(b)))
x,r=int(input()),range(-99,130);[i**5-x-j**5or print(i,j)for i in r for j in r]
import math

X=int(input())

root = math.floor(X**0.2)
half = root//2 - 5

while root > half:
    root2 = (X-root**5)**0.2
    if root**5 + root2**5 == X:
        print(int(root),-int(root2))
        exit()
    root -= 1

root = math.ceil(X**0.2)

while True:
    root2 = (root**5-X)**0.2
    if root**5 - root2**5 == X:
        print(int(root),int(root2))
        exit()
    root+=1
X = int(input())

FIVES = [(x+1) ** 5 for x in range(200)]

for ki,vi in enumerate(FIVES):
    for kj,vj in enumerate(FIVES):
        if ki > kj and vi - vj == X:
            print(ki+1,kj+1)
            exit()
        if vi + vj == X:
            print(ki+1,-(kj+1))
            exit()