peterverebics/CodeNet_Python_118 huggingface dataset:
# D
x = int(input())
for b in range(-100, 101):
    a = x + b**5
    if a**5 - b**5 == x:
        print(a, b)
x = int(input())
for a in range(-500,500):
    for b in range(500):
        if a**5-b**5==x:
            print(a,b)
            exit()
X=int(input())
A=100000
small=2
if X!=1:
    while True:
        if X%small==0:
            break
        small+=1
    for i in range(200000):
        B=A-small
        if (A**4+A**3*B+A**2*B**2+A*B**3+B**4 == X/(A-B)):
            break
        A-=1
    print(str(A)+" "+str(B))
elif X==1:
    print("0 -1")
X = int(input())
flag=1
for A in range(-100,100):
    for B in range(-100,100):
        if(A**5-B**5==X):
            print(A,B)
            break
    else:
        continue
    break
X=int(input())

ans_a=0
ans_b=0

for i in range(-100,100):
    for j in range(-100,100):
        ans=pow(i,5)-pow(j,5)
        if ans==X:
            ans_a=i
            ans_b=j

print(ans_a,ans_b)
X = int(input())

base = 0

count = 1
aa = [0,]
while X > base:
  base = count ** 5
  aa.append(base)
  count += 1

# print(aa)

answer = []

next = aa.pop()
# print(next)

A = len(aa) - 1
A5 = aa[len(aa) - 1]
# print(A, A5)
for i in range(0, A+1):
  if A5 + aa[i] == X:
    answer.append("{} {}".format(A, -i))

if answer:
  print(answer[0])
else:
  A += 1
  for i in range(0, A):
    if next - aa[i] == X:
      print(A, i)
X=int(input())
a=list(range(100))
b=list(range(100))
b.extend(list(range(-100,0)))
for i in a:
  for j in b:
    if i**5-j**5==X:
      print(i,j)
      quit()
x = int(input())

for i in range(-101, 101):
    for j in range(-101, 101):
        if x == pow(i, 5) - pow(j, 5):
            print(i, j)
            exit()
x = int(input())
lim = int(x**(1/5))+1
for i in range(-1000*lim, 1000*lim):
    if x + i**5 < 0:
        continue
    if (x+i**5)**(1/5) == int((x+i**5)**(1/5)):
        print(int((x+i**5)**(1/5)), i)
        exit()
def main():
    paramX = int(input())
    size = 100
    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()
# D
x = int(input())
for b in range(-1000, 1001):
    a = x + b**5
    if a**5 - b**5 == x:
        print(a, b)
X = int(input())
k = 0
for i in range(1,10**4+1):
    if i**5 >= X:
        k = i
        break

for l in range(k):
    a = k-l
    for b in range(a):
        if a**5 - b**5 == X:
            print(a,b)
            break
        elif a**5 + b**5 == X:
            print(a,-b)
            break
X = int(input())

A = [0]
while A[-1]**5 <= X:
    A.append(A[-1]+1)

a5 = []
for a in A:
    a5.append(a**5)

for i in range(len(A)):
    if X-a5[i] in a5:
        b = a5.index(X-a5[i])
        print(i, -1*b)
        break
X=int(input())
MAX=int((10**9)**(1/5))+1
MIN=-int((10**9)**(1/5))-1
for A in range(MIN,MAX):
    for B in range(MIN,MAX):
        if A**5-B**5==X:
            print(A,B)
            exit()
if __name__=='__main__':
    x = int(input())
    n = 0
    while x > (n+1)**5:
        n+=1
    for i in range(n):
        if n**5-i**5==x:
            print('{} {}'.format(n,i))
            break
        if (n-1)**5+i**5==x:
            print('{} {}'.format(n-1,-i))
            break
import sys


def input():
    return sys.stdin.readline().strip()


def main():
    X = int(input())
    check = [i ** 5 for i in range(-100, 100)]
    for i in range(len(check) - 1):
        for j in range(i + 1, len(check)):
            if check[j] - check[i] == X:
                print(j - 100, i - 100)
                return


if __name__ == "__main__":
    main()
from math import floor, pow

X = int(input())
A = floor(pow(X, 0.2))
B5 = A**5 - X
for B in range(-A, A):
    if B**5 == B5:
        print(A, B)
        break
import math
import sys
x=int(input())
for i in range(-100,100):
    for j in range(-100,i):
        if i**5-j**5==x:
            print(i,j)
            sys.exit()
x = int(input())
#print(x)
a = round(x**0.2)
#print(a)
q = abs(a**5-x)
#print(q)
b = round(q**0.2)
#print(b)
if a**5 < x:
    b = b * (-1)

print(a,b)
#coding: utf-8
from math import ceil, floor
X = int(input())
a = floor(X**(1/5))
while True:
    if (a**5 - X) < 0:
        pass
    elif int((a**5 - X)**(1/5)) == (a**5 - X)**(1/5):
        print(a, int((a**5 - X)**(1/5)))
        exit()
    a += 1
import sys
x = int(input())
d = []
for i in range(1, int(x**(1/2)) + 1):
    if x % i == 0:
        d.append(i)
        if x//i not in d:
            d.append(x//i)
for n in d:
    for a in range(-10, 10):
        b = a - n
        secondterm = (a**4) + (a**3)*b + (a**2)*(b**2) + a*(b**3) + b**4
        if x//n == secondterm:
            print(a, b)
            sys.exit()
x = int(input())
ans = (-1,-1)
gojo = [i**5 for i in range(100)]
for i in range(100):
    for j in range(100):
        if gojo[i]+gojo[j]==x:
            ans = (i,-j)
        if gojo [i]- gojo[j]==x:
            ans = (i,j)
        
print(ans[0],ans[1])
import math
import collections

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

    if X == 1:
        z = 0
    else:
        z = int(X ** 0.2)

    tmp = (z ** 5) - X

    print(int((X+tmp)**0.2), tmp)

    return 0

if __name__ == '__main__':
    main()
from sys import stdin
x = int(stdin.readline().rstrip())

if x == 1:
    print(0,-1)

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

N=120
for i in range(N):
  for j in range(N):
    if i**5-j**5==X:
      print(i,j)
      break
    elif -i**5-j**5==X:
      print(-i,j)   
      break 
    elif i**5+j**5==X:
      print(i,-j)
      break
    elif -i**5+j**5==X:
      print(-i,j)
      break 
  else:
    continue
  break
X = int(input())

root = int(X**(1/5))

if root**5 < X:
    rest = X - root**5
    another = -int(rest**(1/5))
else:
    rest = root**5 - X
    another = int(rest**(1/5))

print(root, another)
c=20000
exec(c*2*f'i=c%200;j=c//200;i**5-j**5-{input()}or exit(print(i,j));c-=1;')
import math
x = int(input())

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

for i in range(-1000, 1001):
    a = x + pow5[i]
    for j in range(-100, 101):
        if a == pow5[j]:
            print(j, i)
            exit()
X = int(input())

B = [n**5 for n in range(300)]

A = []

for i in range(300):
    a = i**5- X if i**5 >= X else X-i**5
    A.append(a)

for j in range(300):
    if A[j] in B:
        a = j
        b = B.index(A[j])
        if a**5-b**5 == X:
            print(a,b)
        elif a**+b**5 == X:
            print(a,-b)
        else:
            print(b,a)
        break
X = int(input())

A = 0
B = 0

f = 0

for i in range(200):
    A = -100 + i
    
    if f == 1:
        break
    
    for j in range(200):
        B = -100 + j
        n = A**5 - B**5
        
        if n == X:
            print(A, end=' ')
            print(B)
            f = 1
            break
x=int(input())
c=1

while c**5<x:
  c+=1
b=0  
for i in range(c-1,-1,-1):
  if c**5-i**5==x:
    b=i
    break
    
print(c,b)
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-10:
        print(round(add), tmp)
        break
    if sub- round(sub) < 10e-10:
        print(round(sub), -tmp)
        break
    tmp += 1
x = int(input())
flg = False
for i in range(1, int(x**0.5)+1):
  if flg:
    break
  if x % i == 0:
    a = 0
    b = a - i
    while True:
      cnt = a**5 - b**5
      if cnt == x:
        flg = True
        print(a, b)
        break
      elif cnt < x:
        a += 1
        b = a - i
      elif cnt > x:
        break
x = int(input())

for d in range(1, int(x**0.5)+1):
    if x % d == 0:
        for a in range(0,d+1):
            b = a - d
            if a**4 + (a**3)*b + (a**2)*(b**2) + a*(b**3) + b**4 == x/d:
                print(a, b)
                break
N=int(input())

for i in range(-40,40):
  for j in range(-40,40):
    if pow(i,5)-pow(j,5)==N:
      print(i,j)
      break
  else:
    continue
  break
import sys

sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline


def solve():
    X = int(rl())
    
    a = int(pow(X, 1./5.))
    b = int(pow(X - pow(a, 5), 1./5.))
    print(a, -b)


if __name__ == '__main__':
    solve()
X = int(input())
for a in range(0, 10**2):
    for b in range(0, 10**2):
        if X == a**5 - b**5:
            print(a, b)
            exit()
        elif X == a**5 + b**5:
            print(a, -b)
            exit()
        elif X == -a**5 - (10**4 - b)**5:
            print(-a, 10**4 - b)
            exit()
n = int(input())
nn = int(pow(n,1/5)) + 1
p = sorted(range(nn),reverse = True)
for i in p:
    b = pow(n - i, 1/5)
    if float.is_integer(b):
        break

print(i,int(-b))
x=int(input())
for i in range(-int(x**0.2)-1,int(x**0.2)+1):
    for j in range(-int(x**0.2)-1, int(x**0.2)+1):
        if i**5-j**5==x:
            print(f"{i} {j}")
            break
x = int(input())
for a in range(101):
    for b in range(101):
        if a**5-b**5==x:
            print(a,b)
            exit()
        if a**5+b**5==x:
            print(a,-1*b)
            exit()
x = int(input())

flag = False
for a in range(-118, 119):
    if(flag):
        break
    for b in range(-118, 119):
        if(flag):
            break
        if pow(a, 5) - pow(b, 5) == x:
            print(a,b)
            flag = True
            break
x=int(input())
n=int(x**(1/5))
a=0
b=0
for i in range(n+1):
    for j in range(-1*(n+1),n+1):
        if i**5 - j**5 == x:
            a=i
            b=j
            print(i,j)
            exit(0)
n = int(input())

for i in range(1,10**9):
    b = pow(n - i, 1/5)
    if float.is_integer(b):
        break

print(i,int(-b))
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(i,j)
import math
X = int(input())

for A in range(100):
  C = A ** 5 - X
  if C > 0:
      B = math.sqrt(C)
      if B % 1 == 0:
          print(str(A) + " " + str(B))
          break
    
for B in range(100):
  C = B ** 5 + X
  if C > 0:
      A = math.sqrt(C)
      if A % 1 == 0:
          print(str(A) + " " + str(B))
          break
"""
aを10^3くらいまででいいよね
"""
x = int(input())
for i in range(-10^3,10^3): #b
    for j in range(i,10^3): #a
        # print(i,j)
        if j**5-i**5 == x:
            print(j,i)
            exit()
X=int(input())
for B in range(-100,100):
#     print('------------------------------')
#     print('B:', B)
#     print('B**5:', B**5)
    A = (X+(B**5))**(1/5)
    if (abs(A))%1==0:
        print(int(A), B)
        break
X = int(input())

R = int((X**(1/2))//1)
ans =[0,0]
for i in range(R,0,-1):
  if X % i == 0:
    for j in range(i,-1,-1):
      A = j
      B = A - i
      if A**5 - B**5 == X:
        ans =[A,B]
        break
  
  if ans != [0,0]:
    break


print(ans)
import sys
X = int(input())
L = []
for i in range(1000):
    a = int(i**5)
    L.append(a)
    for j in range(len(L)):
        if X == L[j]-a:
            print(j, i)
            sys.exit()
        elif X == L[j]+a:
            ans = i*-1
            print(j, ans)
            sys.exit()
x=int(input())

for a in range(101):
  for b in range(-100,101):
    if a**5-b**5==x:
      print(a,b)
      exit()
x = int(input())
print(x)
a = 0
b = 0
for i in range(1000):
  for j in range(-500, 500):
    if i**5 - j**5 == x:
      a = i
      b = j
      break

print(a, b)
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())
print(x // 2)
if x % 2 == 0:
    print(2, 0)
else:
    print(x // 2, -1)
NUM=100

X=int(input())

ans_A=0
ans_B=0
flg=False

for i in reversed(range(NUM)):
    for j in range(-1*NUM,NUM):
        res=i**5-j**5
        if res==X:
            ans_A=i
            ans_B=j
            flg=True
            break
    if flg:
        break

print(ans_A,ans_B)
X = int(input())
for b in range(0, 1000):
    for a in range(b + 1, 1000):
        if a ** 5 - b ** 5 == X:
            print(a, b)
            exit()
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)
        break
        
solve()
import sys
x = int(input())
result = [1,1]
for i in range(-100,100):
    for j in range(-100,100):
        if x == pow(i, 5)-pow(j, 5):
            result = [i, j]
            print(*result)
            sys.exit()
print(*result)
from itertools import combinations_with_replacement
#a, b = list(map(int, input().split(" ")))
x = int(input())

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

for a, ma in fivelist.items():
    for b, mb in fivelist.items():
        if ma - mb == x:
            print(f"{a} {b}")
            exit(0)
import numpy as np
x = int(input())
for i in range(65):
    if(i ** 5 -x > 0):
        b = int(pow(i**5-x,1/5))
        if(b**5 == i**5-x):
            print(i,b)
            break
    else:
        b = int(pow(-i**5+x,1/5))
        if(b**5 == -i**5+x):
            print(i,-b)
            break
import math

x = int(input())

l = math.floor(math.log(abs(x), 5)) + 10

s = [i**5 for i in range(l)]

a, b = [0,0]

for i in range(l):
    for j in range(l):
        if s[i] +s[j] == x:
            a, b = i, -j
            break
        elif s[i] - s[j] == x:
            a, b = i, j
            break

print(str(a) + " " + str(b))
x = int(input())

def calc(x):
    for i in range(-100, 101):
        for j in range(i+1, 101):
            if ((j**5) - (i**5)) == x:
                print(j, i)
                return
calc(x)
x=int(input())
l = [x**5 for x in range(-100, 100)]
for i,y in enumerate(l):
    if y+x in l:
        print(f'{l.index(y+x)-99} {i-99}')
        break
a=int(input())
ok=False
for i in range(-120,120):
    for j in range(-120,120):
        if i**5+j**5==a:
            print(i,j)
            ok=True
            break
    if ok:
        break
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
x=int(input())
for a in range(-100,100):
  for b in range(-100,100):
    if a**5-b**5==x:
      print(a,b)
      exit()
#coding: utf-8

import sys

X = int(input())

powers = {}
num = 100
for i in range(num):
    powered = pow(i, 5)
    powers[i] = powered
for a in range(num-1, 0, -1):
    for b in range(0, num):
        poweredA = powers[a]
        poweredB = powers[b]
        if poweredA - poweredB == X:
            print(a, b)
            sys.exit()
        elif poweredA + poweredB == X:
            print(a, -b)
            sys.exit()
x = int(input())

for a in range(1001001001):
    _b = a**5 - x
    if _b != 0 and _b > 0:
        if _b**0.2 == int(_b**0.2):
            print(a, int(_b**0.2))
            break
    elif _b != 0 and _b < 0:
        _b = -1*_b
        if _b**0.2 == int(_b**0.2):
            print(a, -1*int(_b**0.2))
            break
x = int(input())
a = [i**5 for i in range(1500)]
for i in range(1500):
  for j in range(1500):
    if a[i] - a[j] == x:
      print(a[i],a[j])
      break
x = int(input())
resA = 0
resB = 0
for a in range(65):
  for b in range(-64,65):
    A = a**5
    B = b**5
    if A-B==x:
      resA = a
      resB = b
      break
    else:
      pass
  if A-B==x:
    break
print(resA,resB)
X = int(input())
for A in range(-100,101):
    for B in range(-100,101):
        if A**5 - B**5 == X:
            print(A,B)
            exit(0)
import itertools


max_num = 100
num_list = [i for i in range(-max_num,  max_num+1)]
num_list_5 = [i ** 5 for i in range(-max_num,  max_num+1)]
num_comb = list(itertools.combinations(num_list, 2))

x = int(input().strip())
for comb in num_comb:
    a = comb[0]
    b = comb[1]
    a5 = num_list_5[a]
    b5 = num_list_5[b]
    if a5 - b5 == x:
        print(num_list[a], num_list[b])
        break
x = int(input())
for a in range(int(x**(0.2))+1):
  if a**5 >= x:
    b = (a**5 -x)**(0.2)
  else:
    b = -(x-a**5)**(0.2)
  if b == int(b):
    print(a,int(b))
    exit()
X = int(input())

for i in range(X):
    B = i ** 5 -X
    if B < 0:
        C = (-B) ** (1/5)
        flg = 1
    else:
        C = B ** (1/5)
    if not type(C) == complex:
        if C.is_integer():
            if flg == 0:
                print(i,int(C))
                exit()
            else:
                print(i,-int(C))
                exit()
x = int(input())
s = []
flag = 0

for i in range(-80, 80):
    s.append(i**5)

a = -80

for n in s:
    b = -80
    for m in s:
        if n-m == x:
            print(a,b)
            flag = 1
            break
        if flag:
            break
        b += 1

    a += 1
# ABC166 D

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

    for i in range(-64, 65):
        for j in range(-64, 65):
            if i**5 - j**5 == x:
                print(i, j)
                exit()

if __name__ == '__main__':
    main()
x=int(input())
n=int(10**9**(1/5))
gojou=[0]*(n+1)
for i in range(n+1):
    gojou[i]=i**5

for i in range(n+1):
    for j in range(n+1):
        if gojou[i]-gojou[j]==x:
            print(i,j)
            break
        elif gojou[i]+gojou[j]==x:
            if i**5 - (-j)**5 == x:
                print(i,-j)
                break
    else:
        continue
    break
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 = b_**5
        
print(a, int(b.real))
## coding: UTF-8
X = int(input())

a = [-100 + i for i in range(201)]
b = [-100 + i for i in range(201)]

A = -1000
B = -1000
for i in range(201):
    for j in range(201):
        #print('a[i]:{}, b[j]:{}'.format(a[i], b[j]))
        #print(a[i] ** 5)
        #print(b[j] ** 5)
        #print(a[i] ** 5 - b[j] ** 5)
        if(a[i] ** 5 - b[j] ** 5 == X):
            A = a[i]
            B = b[j]
print('{} {}'.format(A, B))
X=int(input())

b=0
while not ((X+b**5)**(1/5)).is_integer():
    b+=1

a=(X+b**5)**(1/5)
print((X+b**5)**(1/5).is_integer())
print('{} {}'.format(int(a),b))
def main():
    n = int(input())

    a = [i**5 for i in range(1000)]
    for i in range(1000):
        for j in range(i+1, 1000):
            if a[i] - a[j] == n:
                print(j, i)
                return
            if a[j] + a[i] == n:
                print(j, -i)
                return

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

for b in range(-10**5,10**5):
    is_minus = False
    if (X + b**5) < 0 : is_minus = True
    result = abs((X + b**5))**(1/5)

    if type(result) is complex:
        continue
    if result - round(result) == 0:
        if is_minus:
            ans_a,ans_b = -b,-round(result)
        else:
            ans_a,ans_b = abs(b),-round(result)


print(ans_a,ans_b)
x,r=int(input()),range(999,-9);[i**5-x-j**5or exit(print(i,j))for i in r for j in r]
s = int(input())
for i in range(-s, s):
    for j in range(-s, s):
        if i**5-j**5 == s:
            print(i, j) 
            break
x=int(input())
for n in range(10**4+1):
    try:
        t = int((n**5-x)**(1/5))
        if isinstance(t,int)==True:
            print(n,t)
            exit()
    except TypeError:
        continue
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(int(p.real), b)
       break
x=int(input())
import math
x5=math.ceil(x**0.2)
#print(x5)
import numpy as np 
for ii in np.arange(x5,-1,-1):
    for jj in range(x5+1):
        #print(ii,jj)
        if ii**5+jj**5==x:
            print(ii,-jj)
            exit()
        if ii**5-jj**5==x:
            print(ii,jj)
            exit()
x=int(input())
bf=0
for i in range(-int(abs(x**0.2)),int(abs(x**0.2))+1):
    for j in range(-int(abs(x**0.2)), int(abs(x**0.2))+1):
        if i**5-j**5==x:
            print(f"{i} {j}")
            bf=1
            break
    if bf==1:
        break
import sys
x = int(input())

for i in range(100):
  a = pow(i, 5)
  for j in range(i, 100):
    b = pow(j, 5)
    if a-b == x:
      print(i, j)
      sys.exit()
    elif a+b == x:
      print(i, -j)
      sys.exit()
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()
n = int(input())
 
a = [i**5 for i in range(119)]
for i in range(119):
    for j in range(i+1,119):
        if a[j]-a[i] == n:
            print(j,i)
            exit()
        if a[j]+a[i] == n:
            print(j,-i)
            exit()
def q4():
    x = int(input())
    for b in range(-1, x):
        a = (x + pow(b, 5)) ** (1 / 5)
        if a.is_integer():
            print(int(a), b)
            break;

q4()
x = int(input())

a = (x - 1) ** (1 / 5)
if a.is_integer():
    print(int(a), -1)

a = (x + 1) ** (1 / 5)
if a.is_integer():
    print(int(a), -1)
x=int(input())
c=1
for a in range(10**3):
    for b in range(-10**3,10**2):
        if a**5-b**5==x:
            print(a,b)
            c=0
            break
    if c==0:
        break
x = int(input())
import sys
for a in range(1000):
  for b in range(1000):
    if (a ** 5 - b ** 5) == x:
      print(str(a)+" "+str(b))
      sys.exit()
    elif(a ** 5 - (-b) ** 5) == x:
      print(str(a)+" "+str(-b))
      sys.exit()
    elif((-a) ** 5 - b ** 5) == x:
      print(str(a)+" "+str(-b))
      sys.exit()
    elif((-a) ** 5 - (-b) ** 5) == x:
      print(str(a)+" "+str(-b))
      sys.exit()
x = int(input())
for a in range(-100,100):
    for b in range(-100,100):
        if a**5 - b**5 == x:
            print(a,b)
            break
    if a**5 - b**5 == x:
        break
x = int(input())
a = 1
b = (x-a)**0.2
while b - int(b) != 0:
    a += 1
    b = (x-a)**0.2
print(a, int(b))
import sys
import heapq
from decimal import Decimal

input = sys.stdin.readline

x = int(input())


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

y = 100
s = -100
t = -100

a = 0
b = 0

while s < y:
    t = -y
    while t < y:
        if s ** 5 - t ** 5 == x:
            a = int(s)
            b = int(t)
        t += 1
    s += 1

print(a, b)
x=int(input())
for i in range(-118,120):
  for j in range(-119,119):
    if x==(i**5-j**5):
      print(i,j)
      break
x = int(input())
a = int((x ** (1/5)))
f = True
if a ** 5 == x:
    print(' '.join([str(a // 1), '0']))
    f = False
b = a
if f:
    while b >= -a:
        if (a ** 5) - (b ** 5) == x:
            print(' '.join([str(a // 1), str(b // 1)]))
            break
        else:
            b -= 1
x=int(input())

#足す場合
max=int(pow(x,0.2))
a=0
b=0
for i in range(0,max+1):
    tmp_b=-1*pow(x-i**5,0.2)
    if int(tmp_b)==tmp_b:
        a=i
        b=int(tmp_b)
        break
print(a,b)
import math
x = int(input())
i = 0
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
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
x=int(input())
l=make_divisors(x)
ll=[(i,i-j) for i in range(100) for j in l]
for a,b in ll:
  if a**5-b**5==x:
    print(a,b)
    break