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

for i in range(-130, 130):
    for j in range(-130, 130):
        if i**5 - j**5 == x:
            print(i, j)
            exit()
import itertools
x = int(input())

for i in range(500):
	for j in range(500):
		if i**5 + j**5 == x:
			print (i,-j)
			exit()
		if i**5 - j**5 == x:
			print (i,j)
			exit()
X = int(input())
for i in range(-500, 500):
    for j in range(-500, 500):
        if i**5 - j**5 == X:            
            ans = [str(i), str(j)]
            break
print(" ".join(ans))
import  sys
x = int(input())

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

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

def binary_search(b):
    l, r = -10 ** 9, 10 ** 9
    while r-l > 1:
        m = (l+r)//2
        x = m**5 - b**5
        if x < X:
            l = m
        else:
            r = m
    return r

for b in range(-10000, 10000):
    a = binary_search(b)
    if a ** 5 - b ** 5 == X:
        print(a, b)
        break
def main():
    paramX = int(input())
    size = 200
    for a in range(size * -1, size):
        for b in range(size * -1, size):
            if pow(a, 5) - pow(b, 5) == paramX:
                print(a, b)
                return
    print(1, 1)
main()
import sys
X = int(input())

for i in range(-1000, 1001):
    # print(i)
    for j in range(-1000, 1001):
        # print(i**5 - j**5)
        if (i**5 - j**5) == X:
            print(str(i) + ' ' + str(j))
            sys.exit()
X=int(input())
B=0
for i in range(-118,120):
    for j in range(-119,119):
        if X==i**5-j**5:
            print(i,j)
            exit()
x=int(input())
li=[]

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

step=len(li)

for j in range(step):
    for k in range(step):
        if li[j][1]-li[k][1]==x:
            print(li[j][0],li[k][0])
            exit()
import sys
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7

def main():
    X = int(input())
    for A in range(-100,10000):
        for B in range(-100,A+1):
            if A**5-B**5==X:
                print(A, B)
                sys.exit()


if __name__ == '__main__':
    main()
L=[0]*10000
X=int(input())
for i in range(10000):
  L[i]=pow(i,5)
for i in range(10000):
  for j in range(10000):
    if L[i]-L[j]==X:
      print(i,j)
      exit()
    if L[i]+L[j]==X:
      print(i,-j)
      exit()
import sys

n = int(input())

def calc(a, b):
  return a**5 - b**5
  
for i in range(-1000, 1001):
  for j in range(-1000, 1001):
    if calc(i, j) == n:
      print(i, j)
      sys.exit()
X = int(input())

for i in range(1001):
    for j in range(-1000, 1001):
        if pow(i, 5) - pow(j, 5) == X:
            print(i, j)
            exit()
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())
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(x**0.2)+100,0,-1):
    A=j
    B=j-i
    if A<B:
      break
    if A**5-B**5==x:
      print(A,B,sep=' ')
      exit()
X = int(input())

for i in range(1,121):
    for j in range(-121,121+1):
        if i**5 - j**5 == X:
            print(i,j)
            exit()
d = {}
for i in range(1, 1000):
    if i ** 5 - (i-1) ** 5 > 10 ** 9:
        break
    for j in range(i-1, -i-1, -1):
        if i ** 5 - j ** 5 > 10 ** 9:
            break
        d[i ** 5 - j ** 5] = (i, j)
print(*d[int(input())])
X = int(input())

lut = [i**5 for i in range(200)]

a = 0
b = 0

for a, a5 in enumerate(lut):
    for b, b5 in enumerate(lut):
        if a5 + b5 == X:
            print(a,-b)
            exit()
        elif a5 -b5 == X:
            print(a, b)
            exit()
X = int(input())
for A in range(-120, 120):
    for B in range(-120, 120):
        if A**5 - B**5 == X:
            print(A,B)
            exit()
X = int(input())

A = 0
B = 0

f = 0

for i in range(400):
    A = -200 + i
    
    if f == 1:
        break
    
    for j in range(400):
        B = -200 + j
        n = A**5 - B**5
        
        if n == X:
            print(A, end=' ')
            print(B)
            f = 1
            break
import math
x=int(input())
for i in range(-1000,1000):
    for j in range(-1000,1000):
        if i**5-j**5==x:
            print(i,j,sep=" ")
            exit()
def main():
  sFlag=False
  X= int(input())
  for i in range(-1000,1000):
    for j in range(-1000,1000):
      X_n=i**5-j**5
      if(X_n==X):
        print(i,j)
        sFlag=True
        break
    if(sFlag==True):
      break
 
if __name__=='__main__':
  main()
X = int(input())
As = [0]*121
for i in range(1,121):
  As[i] = i**5

flag = 0
for i in range(1,121):
  a = As[i]
  for j in range(i+1):
    b = As[j]
    if a + b == X:
      print(i,-j)
      flag = 1
      break
    elif a - b == X:
      print(i, j)
      flag = 1
      break
  if flag == 1:
    break
X = int(input())
for a in range(0,121):
    for b in range(-121,122):
        if X == a**5-b**5:
            print(a,b)
            break
    else:
        continue
    break
X = int(input())
def add(a,b):
  return a**4+a**3*b+a**2*b**2+a*b**3+b**4
for i in range(-118,120):
  for j in range(-118,120):
    if (i-j)*add(i,j) == X:
      print(i,j)
      quit()
def find(n):
  dif = 0
  i = 0
  while dif <=n:
    i+=1
    dif=i**5-(i-1)**5
  return i


X= int(input())
lim = find(X)
condition = True 
for i in range(lim):
  if condition:
    puissance = i**5-X
    signe = (abs(puissance)//puissance)
    entier = int(((puissance*signe)**(1/5)))
    if entier**5 == signe*puissance:
      print(i, entier*signe)
      condition = False
X = int(input())
for a in range(-500, 501, 1):
    for b in range(-500, 501, 1):
        if a**5 - b**5 == X:
            print(a, b)
            exit()
X = int(input())
pow5 = [i**5 for i in range(-150,150)]
for a in range(-150,150):
  for b in range(-150,150):
    if pow5[a+150]-pow5[b+150] ==X:
      print(a,b)
      exit(0)
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())

a = x
for a in range(-200,200):
    for b in range(-200,200):
        if a**5 -b**5 == x:
            print(a,b)
            exit()
import sys
x = int(input())

# b<=0

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


# b>0

for i in range(0,int(x**(1/4)+1)):
    for j in range(-int(x**(1/4))-2,0):
        if i**5 - j**5 == x:
            print(i,j)
            sys.exit()
X=int(input())
A=[]
i,p=0,True
while p:
  a=i**5
  A.append(a)
  for b in A:
    if a-b==X:
      p=False
      print(i,A.index(b))
      break
    elif a+b==X:
      p=False
      print(i,-1*A.index(b))
      break
  i+=1
x = int(input())

pow5 = [i ** 5 for i in range(-1000, 1000)]

for a in range(-1000, 1000):
  for b in range(-1000, 1000):
    if pow5[a + 1000] - pow5[b + 1000] == x:
      print(f"{a} {b}")
      exit(0)
X = int(input())
for i in range(-130,130):
    A = i**5
    for j in range(-130,130):
        if A-j**5 == X:
            print('{0} {1}'.format(i,j))
            exit()
X = int(input())

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

for a, i in enumerate(lists):
    for b, j in enumerate(lists):
        if X == i - j:
            print(a, b)
            exit()
        elif X == i + j:
            print(a, -b)
            exit()
x=int(input())

for a in range(-140,140):
  for b in range(-140,140):
    if (a**5-b**5)==x:
      c=a
      d=b
      break
      
print(str(c)+' '+str(d))
#!/usr/bin/env python3

X = int(input())

for i in range(0, 1000):
    for j in range(0, 1000):
        if i**5 - j**5 == X:
            print(i, j)
            exit()
        if i**5 + j**5 == X:
            print(i, -j)
            exit()
        if -i**5 - j**5 == X:
            print(-i, j)
            exit()
        if -i**5 + j**5 == X:
            print(-i, -j)
            exit()
import sys

X = int(sys.stdin.readline().strip())

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

for a in range(-1000, 1000):
    for b in range(-1000, 1000):
        if a ** 5 - b ** 5 == x:
            print(a, b)
            exit()
def f(n):
    low, high = -1100, 1100
    while high - low > 1:
        mid = (high + low) // 2
        if mid**5 <= n:
            low = mid
        else:
            high = mid
    return low

x = int(input())
for a in range(1000):
    b = f(a**5 - x)
    if a**5 - b**5 == x:
        print(a, b)
        quit()
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
#N, K = map(int, input().split())
# 文字列の入力
x = int(input())
#開業されたN個要素を受け付ける
#list = [input() for i in range(N)]

a=150
while a > -150:
    b=a-1
    while b > -150:
        if pow(a, 5) - pow(b, 5)==x:
            print(a, b)
            exit()
        b=b-1
    a=a-1
import sys
from collections import deque
import copy
def main():
    X = int(input())
    now = 1
    for A in range(-118, 120):
        for B in range(-119, 118):
            if A ** 5 - B ** 5 == X:
                print(A, B)
                sys.exit()


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

def cal(num):
    return num*num*num*num*num

A=0
while(1):
    B=0
    while(cal(A)-cal(B)>num):
        B+=1
    if cal(A)-cal(B)==num:
        print(str(A)+" "+str(B))
        break
    B=0
    while(cal(A)-cal(B)<num):
        B-=1
    if cal(A)-cal(B)==num:
        print(str(A)+" "+str(B))
        break
    A+=1
X = int(input())

for a in range(-118, 120):
    for b in range(-118, 120):
        if a**5 - b**5 == X:
            print(a, b)
            break
    else:
        continue
    break
n=int(input())
for i in range(-121,121):
    for j in range(-121,121):
        if i**5 - j**5 == n:
            print(i, j)
            exit(0)
x = int(input())
for a in range(200):
    for b in range(-200, 200):
        if a ** 5 - b ** 5 == x:
            print(a, b)
            exit()
x=int(input())
value=0
index=0
hashmap=dict()
while value<int(1e18)+1:
    value=pow(index,5)
    hashmap[value]=index
    index+=1
for i in range(1,1000):
    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(b2)!=None:
        print(hashmap[b2],-i)
        break
c=24000
exec(c*2*f'i,j=c%200,c//200;i**5-j**5-{input()}or exit(print(i,j));c-=1;')
x = int(input())
done=False
for a in range(-6000,6001):
  for b in range(-6000,6001):
    if(not done and a**5-b**5==x):
      print(a,b)
      done=True
x = int(input())
for i in range(120):
  for j in range(-119, i):
    if i**5 - j**5 == x:
      print(i, j)
      exit()
X = int(input())
from math import pow
for a in range(-120,120,1):
    for b in range(-120,120,1):
        if pow(a,5)-pow(b,5)==X:
            print(a,b);exit()
X = int(input())

mid = -150
for A in range(-149,150):
    B1 = -150
    B2 = A-1
    A5 = A**5
    while B2-B1>1:
        mid = (B1+B2)/2
        if A5 - int(mid)**5 == X:
            break
        elif A5 - mid**5 <= X:
            B2 = mid
        else:
            B1 = mid
    if A5 - int(mid)**5 == X:
        break

print(A,int(mid))
x = int(input())
a = 0
b = 0

for i in range(-130,130):
  for j in range(-130,130):
    if x == (i**5) - (j**5):
      a = i
      b = j
print(a,b)
X = int(input())
A = 0
B = int(-X**(1/5))

while True:
  ans = A**5-B**5
  if ans == X:
    break
  elif ans < X:
    A += 1
  elif ans > X:
    B += 1
print("{} {}".format(A,B))
X = int(input())

for A in range(-500,500):
    for B in list(range(-500,500)):
        if A**5 - B**5 == X:
            print(f'{A} {B}')
            exit()
x=int(input())

dic={}



a=set([])
for i in range(1000):
    a.add(i**5)
    dic[i**5]=i
    a.add(-1*i**5)
    dic[-1*i**5]=i*(-1)

#print(dic)

for item1 in a:
    for item2 in a:
        if item1 - item2==x:
            print(dic[item1],dic[item2])
            exit()
import sys

X = int(input())

for a in range(-118, 119+1):
    for b in range(-119, 118+1):
        if a**5 - b**5 == X:
            print(a, b)
            sys.exit()
X = int(input())
ans = []

for a in range(-200, 201):
    A = a**5
    for b in range(-200, 201):
        B = b**5
        if A-B == X:
            ans.append([a, b])
            break
    if len(ans) > 0:
        break
print(*ans[0])
x = int(input())

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

for i in range(-200,200,1):
    for j in range(-200,200,1):
        if (i**5 - j**5) == X:
            print(str(i) + ' ' + str(j))
            break
    else:
        continue
    break
x = int(input())
for i in range(-118,120):
    for j in range(-118,119):
        if i**5-j**5 == x:
            print(i,j)
            quit()
x = int(input())

for a in range(130):
    for b in range(130):
        if a**5 - b**5 == x:
            print(a,b) 
            exit()
for a in range(130):
    for b in range(130):
        if a**5 + b**5 == x:
            print(a,-b)
            exit()
x=int(input())
import itertools
for a,b in itertools.product(range(-1000,1001),repeat=2):
    if x==a**5-b**5:
        print(a,b)
        break
X = int(input())
pin = 0
for i in range(-120, 120):
    if pin == 1:
        break
    for j in range(-120, 120):
        if pow(i, 5) - pow(j, 5) == X :
            pin =1
            print(i, j)
            break
import math
x = int(input())

for a in range(-1000, 1000):
    for b in range(-1000, 1000):
        if math.pow(a, 5) == x + math.pow(b, 5):
            print(a, b)
            exit()
x = int(input())
for i in range(-118,119):
  for j in range(-119,118):
    if i**5 - j**5 == x:
      print(i,j)
      quit()
X=int(input())
for A in range(-500,501):
    for B in range(-500,501):
        if(A**5-B**5==X):
            print(A,B)
            exit()
import sys
x=int(input())
a=0
while True:
  for i in range(-64,a):
    if a**5-i**5==x:
      print(a,i)
      sys.exit()
  a+=1
from sys import exit

X = int(input())
for i in range(400):
    for j in range(400):
        if (i - 200) ** 5 - (j - 200) ** 5 == X:
            print(i - 200, j - 200)
            exit()
x = int(input())

a = 0
while True:
    b = a
    while a**5 - b**5 <= x:
        if a**5 - b**5 == x:
            print(a, b)
            exit()
        b -= 1
    a += 1
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
    else:
        continue
    break
X=int(input())


pow5=[i**5 for i in range(-1000,1001)]
for i,a5 in enumerate(pow5):
    for j,b5 in enumerate(pow5):
        if a5 - b5 == X:
            print(-1000+i,-1000+j)
            exit()
x=int(input())
aa=0
ab=0
for a in range (-200,200):
    for b in range (-200,200):
        if a**5-b**5==x:
            aa=a
            ab=b
print(aa,ab)
x = int(input())


gap = 1
while True:
    a, b = 0, -gap
    while True:
        if a ** 5 - b ** 5 == x:
            print(a, b)
            exit()
        elif a ** 5 - b ** 5 > x and a > 0 and b > 0:
            break
        else:
            a += 1
            b += 1
    gap += 1
X = int(input())
for a in range(-2000, 2001):
    for b in range(-2000, 2001):
        if pow(a, 5) - pow(b, 5) == X:
            print(a,b)
            exit()
import sys

input=sys.stdin.buffer.readline


#sys.setrecursionlimit(10**9)
#from functools import lru_cache

def RD(): return sys.stdin.read()


def II(): return int(input())


def MI(): return map(int,input().split())


def MF(): return map(float,input().split())


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


def LF(): return list(map(float,input().split()))


def TI(): return tuple(map(int,input().split()))


# rstrip().decode('utf-8')
import numpy as np

def main():
	x=II()
	for i in range(-300,300):
		for j in range(-300,300):
			if i**5==x+j**5:
				print(i,j)
				exit()






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:
      print(str(i)+' ' +str(j))
      exit()
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)
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    x=int(input())
    for i in range(-300,300):
        for j in range(-300,300):
            if i**5-j**5==x:
                print(i,j)
                sys.exit()

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

X = int(input())

for i in range(1001):
    f = round((X + i ** 5) ** 0.2)
    if f ** 5 - i ** 5 == X:
        print(int((X + i ** 5) ** 0.2), i)
        exit()

for i in range(1, 1001):
    f = round(abs(X - i ** 5) ** 0.2)
    if X - i ** 5 > 0:
        if f ** 5 - (-i) ** 5 == X:
            print(f, -i)
            exit()
    else:
        if (-f) ** 5 - (-i) ** 5 == X:
            print(-f, -i)
            exit()
import sys
x = int(input())
for i in range(-500, 500):
    for j in range(-500, 500):
        if i**5 - j**5 == x:
            print(i, j)
            sys.exit()
x = int(input())
for i in range(-118,120):
  for j in range(-119,129):
    if i**5 - j**5 == x:
      print(i, j)
      exit()
x = int(input())
a = 0

while True:
    b = 0
    b2 = 0
    while a**5 - b**5 > 0 or a**5 - b2**5 < 10**9:
        if a**5 - b**5  == x:
            print(a ,b)
            break
        b += 1
        if a**5 - b2**5 == x:
            print(a ,b2)
            break
        b2 -= 1
    else:
        a += 1
        continue
    break
x=int(input())
up=0
for i in range(1000):
    if (i+1)**5-i**5>10**9:
        up=i
        break
for a in range(-up-1,up+1):
    for b in range(-up-1,up+1):
        if a**5-b**5==x:
            print(a,b)
            exit()
x = int(input())
a = 0
for i in range(-118,120):
    for j in range(-119,119):
        if(i**5-j**5==x):
            print(i,j)
            a=1
            break
    if a==1:
        break
X = int(input())

# A**5 - B**5, >0 A>B (Bminusあり)

for a in range(1000000):
  a5 = a ** 5
  for b in range(a-1,-1000000,-1):
    b5 = b**5
    if a5 - b5 == X:
      print(a,b)
      exit(0)
    elif a5 - b5 > X:
      break
x = int(input())
for i in range(-10000, 10000):
	z = x - i**5
	if int((z**(1.0/5)).real)**5 == z:
		print(int((z**(1.0/5)).real), -1*i)
		break
x = int(input())

r = 500

for a in range(-r,r):
    for b in range(-r,r):
        if a**5 - b**5 == x:
            print(f"{a} {b}")
            exit()
n = int(input())

for a in range(-200,200):
    for b in range(-200,200):
        if a**5 - b**5 == n:
            print(a,b)
            exit()
x = int(input())
if int(x**0.2)==int(x)**0.2:
  print(int(x**0.2),0)
  exit()
for i in range(1,10**5):
  b = i
  c = -i
  x1 = x + b**5
  x2 = x + c**5
  if x1>=0 and int(x1**0.2)**5==x1:
    print(int(x1**0.2),b)
    exit()
  if x2>=0 and int(x2**0.2)**5==x2:
    print(int(x2**0.2),c)
    exit()
  if x2<0:
    for j in range(1,10**3):
      v = -j
      if v**5==x2:
        print(v,c)
        exit()
def main():
    x = int(input())
    for a in range(-120, 121):
        for b in range(-120, 121):
            if a**5 - b**5 == x:
                print(a, b)
                return

if __name__ == "__main__":
    main()
import sys
sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline

x = int(input())

m = 500
aa = [0]*(m*2)
for i in range(-m,m):
    j = -m+i
    aa[j] = i**5

for i in range(m*2):
    for j in range(m*2):
        if aa[i] - aa[j] == x:
            print(-m+i,-m+j)
            exit()
x = int(input())

flag = False
for a in range(-200, 200):
    for b in range(-200, 200):
        if a ** 5 - b ** 5 == x:
            flag = True
            print(str(a) + " " + str(b))
            break
    if flag:
        break
X=int(input())
for i in range(-200,201):
    for j in range(-200,201):
        if i**5-j**5==X:
            print(i,j)
            exit()
X = int(input())
flag = 0
            
#Aの範囲
for i in range(-118, 119):
    for j in range(-119, 118):
        if(i ** 5 - j ** 5 == X and flag == 0):
            print(i, j)
            flag += 1
X = int(input())
A = list(range(-200, 200))
B = list(range(-200, 200))
for a in A:
  for b in B:
    if a**5 - b**5 == X:
      print(a, b)
      exit()
X = int(input())

for A in range(100000000):
    flg=0
    for B in range(A):
        if A**5 - B**5 == X:
            print(A,B)
            flg=1
            break
        if A**5 + B**5 == X:
            print(A,B*(-1))
            flg=1
            break
    if flg==1:
        break
from math import sqrt
x = int(input())
def f(x):
  h = int(sqrt(x))
  for i in range(1,h+1):    
    if x%i == 0:
      
      m = x//i      
      for a in range(0,1000):        
        b = a-i        
        if a**4 + (a**3)*b + (a**2)*(b**2) + a*b**3 + b**4 ==m:
          return a,b
      
print(*f(x))
x=int(input())
ans=[]
for a in range(500,-500,-1):
  for b in range(500,-500,-1):
    if a**5-b**5 == x:
      ans.append(a)
      ans.append(b)
      print(*ans)
      exit()
ans = 0
for o in w:
  if o == 1:
    ans+=1
print(ans)
x = int(input())

for i in range(10000):
    for j in range(1000):
        if i**5 - j**5 == x:
            print(i,j)
            quit()
            break
        if i**5 - (-j)**5 ==x:
            print(i,-j)
            quit()
            break
# -*- coding: utf-8 -*-
import sys

X = int(input().strip())
#-----

for a in range(-118,120):
    for b in range(-118,120):
        if (a**5 - b**5) == X:
            print(a,b)
            sys.exit()
x = int(input())
for i in range(-200,201):
    for j in range(-200,201):
        if i**5-j**5==x:
            print(i,j)
            exit()
X = int(input())
for a in range(-200, 200):
    for b in range(-200, 200):
        if pow(a, 5) - pow(b, 5) == X:
            print(a, b)
            exit()
x = int(input())

d = 1
while d * d <= x:
	if (x % d) == 0:
		for b in range(-200, 200):
			a = b + d
			if a**4 + a**3 * b + a**2 * b**2 + a * b**3 + b**4 == x // d:
				print(a, b)
				exit(0)
	d += 1
x=int(input())

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

for a in list(anses):
    for b in list(anses):
        if a**5 - b**5 == x:
            print(a,b)
            exit(0)
from sys import 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)
            exit()
input1 = int(input())

for A in range(-130,130):
    for B in range(-130,130):
        if A ** 5 - B ** 5 == input1:
            print(A,B)
            exit()
x = int(input())
for a in range(120):
    for b in range(-120, 120):
        if a ** 5 - b ** 5 == x:
            print(a, b)
            exit()
x = int(input())

a = 1
while True:
    b = 0
    a5 = a ** 5
    b5 = b ** 5
    while a5 - b5 > x:
        b += 1
        b5 = b ** 5
    if a5-b5 == x:
        print(a, b)
        exit()

    b = 0
    b5 = b ** 5
    while a5 - b5 < x:
        b -= 1
        b5 = b ** 5
    if a5-b5 == x:
        print(a, b)
        exit()

    a += 1
import sys
input = sys.stdin.readline

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()
lis = [i ** 5 for i in range(-300,300)]
x = int(input())
for i in range(len(lis)):
    for j in range(len(lis)):
        if lis[i] - lis[j] == x:
            print(i-300,j-300)
            exit()
x = int(input())

for i in range(-200, 200):
    k = i**5
    for j in range(-200, 200):
        if k - j**5 == x:
            print(i, j)
            exit()
A= int(input())
for i in range(-119,119):
   for j in range(-119,119):
      if i**5-j**5 == A:
         print(i,j)
         exit()