Problem:
 Score : 400 points    Problem Statement Give a pair of integers (A, B) such that A^5-B^5 = X .
It is guaranteed that there exists such a pair for the given integer X .      Constraints  1 \leq X \leq 10^9  X is an integer.  There exists a pair of integers (A, B) satisfying the condition in Problem Statement.         Input Input is given from Standard Input in the following format:  X       Output Print A and B , with space in between.
If there are multiple pairs of integers (A, B) satisfying the condition, you may print any of them.  A  B         Sample Input 1 33      Sample Output 1 2 -1  For A=2 and B=-1 , A^5-B^5 = 33 .       Sample Input 2 1      Sample Output 2 0 -1

Solution (Python):
import sys
def main():
 x = int(input())
 for i in range(-200, 200):
   for j in range(-200, 200):
     if i**5-j**5 ==x:
       print(i,j)
       sys.exit()
if __name__ == "__main__":
    main()

Solution (Python):
import sys
def main():
 x = int(input())
 for i in range(-200, 200):
   for j in range(-200, 200):
     if i**5-j**5 ==x:
       print(i,j)
       sys.exit()
if __name__ == "__main__":
    main()

Solution (Python):
import sys
x = int(input())
for i in range(-200, 200):
  for j in range(-200, 200):
    if i**5-j**5 ==x:
      print(i,j)
      sys.exit()

Solution (Python):
import sys
x = int(input())
for i in range(-200, 200):
  for j in range(-200, 200):
    if i**5-j**5 ==x:
      print(i,j)
      sys.exit()

Solution (Python):
def run():
  X = int(input())
  flag = 0
  
  for a in range(-118, 120):
    for b in range(-119, 119):
      if a**5-b**5==X:
        A = a
        B = b
        flag = 1
        break
    if flag==1:
      break
  
  print("{} {}".format(A, B))
  
if __name__ == "__main__":
  run()

Solution (Python):
def main():
    x = int(input())
    ans = [i**5 for i in range(-125, 126)]
    for i, v1 in enumerate(ans, -125):
        for j, v2 in enumerate(ans, -125):
            if (v1-v2==x):
                print(i, j)
                return

if __name__ == "__main__":
    main()

Solution (Python):

x = int(input())

def ans():
    for a in range(-1000, 1000):
        for b in range(-1000, 1000):
            if a**5 - b**5 == x:
                return print(a, b)
            
ans()

Solution (Python):
x=int(input())

f=0
for i in range(1000):
  for j in range(-1000,1000):
    if (i**5-j**5)==x:
      print(i,j)
      f=1
  if f==1:
    break

Solution (Python):
n = int(input())

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

Solution (Python):
x=int(input())
for A in range(120):
    k=A**5-x
    if k>=0:
        l=int(k**0.2)
        if l**5==k:
            print(A,l)
            break
    else:
        k=-k
        l=int(k**0.2)
        if l**5==k:
            print(A,-l)
            break

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

Solution (Python):
import sys
from collections import defaultdict, deque
import bisect
from heapq import *
from math import factorial, ceil, floor
from collections import defaultdict
import itertools
sys.setrecursionlimit(200000)
input = sys.stdin.readline









X, = map(int, input().split())

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

Solution (Python):
X = int(input())

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

solve()

Solution (Python):
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()

Solution (Python):
x=int(input())
for A in range(10**3):
    k=A**5-x
    if k>=0:
        l=int(k**0.2)
        if l**5==k:
            print(A,l)
            break
    else:
        k=-k
        l=int(k**0.2)
        if l**5==k:
            print(A,-l)
            break

Solution (Python):
'''
A = 500 とする。
このとき、X = 10^9 となるのは、 B = 499.9968... のとき。
→ AまたはB (の絶対値) が大きすぎると、Xが10^9に収まらない。

A, Bの探索範囲は -120~120で十分。
'''

from itertools import product

def main():
    X = int(input())
    for A, B in product(range(-150, 150), range(-150, 150)):
        if A**5 - B**5 == X:
            print(A, B)
            return

main()

Solution (Python):
X = int(input())
break_flag = False

if X == 0:
    print("0 0")
elif X > 0: 
    for i in range(-1000,1000):
        for j in range(-1000,i):
            if X == i**5-j**5:
                print(i,j)
                break_flag = True
                break
        if break_flag == True:
            break        

elif X < 0: 
    for i in range(-1000,1000):
        for j in range(i+1,1000):
            if X == i**5-j**5:
                print(i,j)
                break_flag = True
                break
        if break_flag == True:
            break

Solution (Python):
def resolve():
    N = int(input())
    facts = [i ** 5 for i in range(120)]
    for a, a5 in enumerate(facts):
        for b, b5 in enumerate(facts):
            if a5 + b5 == N:
                print(a, -b)
                break
            if a5 - b5 == N:
                print(a, b)
                break
        else:
            continue
        break


resolve()

Solution (Python):
N=int(input())
def math(N):
  for i in range(-600,600):
    for j in range(-600,600):
      if i**5-j**5==N:
        return [i, j]
        break
print(*math(N))

Solution (Python):
x = int(input())
flag = False

for i in range(-1000, 1001):
    for j in range(-1000, 1001):
        if i**5-j**5 == x:
            flag=True
            print(i,j)
            
        if flag: break
    if flag: break

Solution (Python):
x=int(input())
f=0
for i in range(1000):
  for j in range(-1000,1000):
    if (i**5-j**5)==x:
      print(i,j)
      f=1
  if f==1:
    break

Solution (Python):

x = int(input())
achieve = 0

for a in range(1000):
    for b in range(-1000,1000):
        if(a**5 - b**5) == x:
            print(a, b)
            achieve = 1
    if achieve == 1:
        break

Solution (Python):
X = int(input())

def return_AB(X):
    for i in range(-300,300,1):
        
        for j in range(-300,300,1):
            
            Y = i**5 - j**5
            
            if X == Y:
                return i,j
    else:
        return None, None

A,B = return_AB(X=X)
print("{} {}".format(A,B))

Solution (Python):
X = int(input())

a = 0
b = 0

for i in range(-1000, 1000):
    for j in range(-1000, 1000):
        if(i * i * i * i * i - j * j * j * j * j == X):
            a = i
            b = j
            break




print("{} {}".format(a, b))

Solution (Python):
X = int(input())

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


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

    return 0, 0


A, B = foo()
print(A, B)

Solution (Python):
X = int(input())

stopFlag = 0
for i in range (-201, 201):
    a = i
    for j in range(-201, 201):
        if a**5 - j**5 == X:
            print (a, j)
            stopFlag = 1            
        if stopFlag:
            break
    if stopFlag:
        break

Solution (Python):
x=int(input())
 
for i in range(-200, 201):
    a=i
    for j in range(-200, 201):
        b=j
        if a**5 -b**5==x:
            print(a, b)
            exit()

Solution (Python):
X = int(input())
for a in range(200):
    for b in range(-100, 200):
        if a**5 - b**5 == X:
            res = (a, b)
print(*res)

Solution (Python):
import sys
X=int(input())
for j in range(-118,120):
    for i in range(-118,120):
        if pow(i,5)-pow(j,5)==X:
            print(i,j)
            sys.exit()

Solution (Python):
import sys
def main():
    
    x = int(input())

    flag = 0
    for a in range(-118, 120, 1):
        for b in range(-119, 119, 1):
            if pow(a,5)-pow(b,5)==x:
                flag = 1
                break
        if flag==1: break

    print(str(a)+" "+str(b))

main()

Solution (Python):
import itertools

X = int(input())

for a, b in itertools.product(range(128), range(-128, 128)):
  if(a ** 5 - b ** 5 == X):
    print(a, b)
    break

Solution (Python):
x = int(input().strip())
for i in range(-200, 201):
    for j in range(-200, 201):
        if i ** 5 - j ** 5 == x:
            print(i, j)
            exit()

Solution (Python):
x = int(input())
lst = []
for i in range(-118, 120):
    for j in range(-119, 119):
        y = i ** 5 - j ** 5
        if y == x:
            lst_1 =[]
            lst_1.append(i)
            lst_1.append(j)
            lst.append(lst_1)
print(lst[0][0], lst[0][1])

Solution (Python):
x = int(input())

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

Solution (Python):
X=int(input())
f={}
for a in range(200):
    for b in range(-200,200):
        f[a**5-b**5]=[a,b]
A,B=f[X]
print(A,B)

Solution (Python):
X = int(input())
a = []
for i in range(4000):
  a.append(i**5)
for i in range(4000):
  if X + a[i] in a:
    A = int((X + a[i])**0.2)
    B = i
  elif X - a[i] in a:
    A = int((X - a[i])**0.2)
    B = -i
print(A,B)

Solution (Python):
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()

Solution (Python):
X = int(input())

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

f()

Solution (Python):
x = int(input())
for i in range(-500,500):
  for j in range(-500,500):
    a = pow(i,5)
    b = pow(j,5)
    if(x == a - b):
      print(i,j)
      exit(0)

Solution (Python):
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()

Solution (Python):
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()

Solution (Python):
X = int(input())

for a in range(-200, 201):
    for b in range(-200, 201):
        if a * a * a * a * a - b * b * b * b * b == X:
            print(a, b)
            exit(0)

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import time,random

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
mod2 = 998244353
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


def main():
    x = I()
    for a in range(1,1000):
        a5 = a**5
        for b in range(a+1):
            b5 = b**5
            if a5 + b5 == x:
                return JA([a,-b], " ")
            if a5 - b5 == x:
                return JA([a,b], " ")

    return -1


print(main())

Solution (Python):
x = int(input())
judge = 0
for i in range(-200,200):
  for j in range(-200,200):
    if(i**5-j**5==x):
      print(i,j)
      judge += 1
      break
  if(judge == 1):
    break

Solution (Python):


def main():
    x = int(input())
    for a in range(-120, 120):
        for b in range(-120, 120):
            if a ** 5 - b ** 5 == x:
                print(a, b)
                break
        else:
            continue
        break


if __name__ == '__main__':
    main()

Solution (Python):
X = int(input())

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

Solution (Python):
x=int(input())

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

Solution (Python):
N = int(input())
array = [_**5 for _ in range(0,120)]

for x in array[:]:
    for y in array[:]:
        if x - y == N:
            print(array.index(x),array.index(y))
            exit()
        elif x + y == N:
            print(array.index(x),-array.index(y))
            exit()

Solution (Python):
a = int(input())

flg = False
ans = 0
for b in range(-1000,1000):
    for c in range(-1000,1000):
        if (b**5) - (c**5) == a:
            print(b,c)
            flg = True
    if flg:
        break

Solution (Python):
m=5**6
exec(f'i,j=m%128,m>>7;m-=i**5-j**5!={input()}or exit(print(i,j));'*2*m)

Solution (Python):
x = int(input())

b = -1
while True:
    b+=1
    amin = (x + b**5)**0.2
    apls = (x - b**5)**0.2

    if isinstance(amin, float):
        amin = round(amin,10)
        if amin.is_integer():
            print(int(amin),b)
            break
    
    if isinstance(apls,float):
        apls = round(apls,10)
        if apls.is_integer():
            print(int(apls),-1*b)
            break

Solution (Python):
import sys
input = sys.stdin.readline


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(200):
	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()

Solution (Python):
import sys
input = lambda: sys.stdin.readline().strip()

def main():
    X = int(input())
    for diff in range(-200,200):
        for a in range(-200,200):
            b = a-diff
            if (a**5 - b**5) == X:
                break
        else:
            continue
        break
    print(a,b)

main()

Solution (Python):
N = 200

x = int(input())
A, B = 0, 0
for a in range(N):
    for b in range(-N, N):
        if a**5 - b**5 == x:
            A, B = a, b

print(A, B)

Solution (Python):
def Main(X):
    for i in range(-178, 178):
        for j in range(-178, 178):
            if i**5-j**5 == X:
                return i,j

def main():
    X = int(input())
    i, j = Main(X)
    print("{0} {1}".format(i, j))

if __name__ == '__main__':
    main()

Solution (Python):
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()

Solution (Python):
c=5**6
exec(c*2*f'i,j=c%120,c//120;c-=i**5-j**5!={input()}or exit(print(i,j));')

Solution (Python):
x = int(input())
for i in range(-1000, 1000):
    for j in range(-1000, 1000):
        if i**5 - j**5 == x:
            print(str(i) + " " + str(j))
            exit()

Solution (Python):
import numpy as np
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines

X = int(input())
for a in range(10**3):
    for b in range(10**3):
        aa = a ** 5
        bb = b ** 5
        if aa - bb == X:
            print(a, b)
            sys.exit()
        if aa + bb == X:
            print(a, -b)
            sys.exit()
        if -aa - bb == X:
            print(-a, b)
            sys.exit()
        if -aa + bb == X:
            print(-a, -b)
            sys.exit()

Solution (Python):


def read_int():
    return int(input().strip())


def read_ints():
    return list(map(int, input().strip().split(' ')))


def solve():
    X = read_int()
    A = 0
    B = 0
    
    while True:
        if A**5-B**5 == X:
            return '%s %s'%(A, B)
        if A**5+B**5 == X:
            return '%s %s'%(A, -B)
        if A == B:
            A += 1
            B = 0
        else:
            B += 1


if __name__ == '__main__':
    print(solve())

Solution (Python):
x = int(input())
a0, a1 = -118, 119
b0, b1 = -119, 118
flag = False
for a in range(a0, a1+1):
    for b in range(b0, b1+1):
        if a**5 - b**5 == x:
            a_ , b_ = a, b
            flag = True
            break
    if flag is True:
        break
print(a_, b_)

Solution (Python):
x = int(input())

flag = False
for a in range(-118, 120):
    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

Solution (Python):
















X = int(input())
for A in range(-1000,1001):
    for B in range(-1000,1001):
        if A**5 - B**5 == X:
            print(A,B)
            exit()

Solution (Python):
def power(x,y):
	res=1
	while y>0:
		if y%2==1:
			res=(res*x)
		y=y//2
		x=x*x
	return res

x=int(input())
for i in range(-1000,1001,1):
	rr=power(i,5)
	for j in range(-1000,1001,1):
		temp=rr-power(j,5)
		if temp==x:
			print(i,j)
			exit()

Solution (Python):
x=int(input())
import math
import sys
A=[math.pow(i,5) for i in range(-1000,1000,1)]
B=[math.pow(i,5) for i in range(-1000,1000,1)]
for n in A:
  for m in B:
    if n-m==x:
      print(-1000+A.index(n),-1000+B.index(m))
      sys.exit()

Solution (Python):
def calc(n):
    x = 1 << (n.bit_length() + 4) // 5
    y = (4 * x + n // (x ** 4)) // 5
    while y < x:
        x = y
        y = (4 * x + n // (x ** 4)) // 5
    return x
def f(n):
    return calc(n) if n > 0 and calc(n) ** 5 == n else 0

X = int(input())
for i in range(1 << 10):
    a = f(X + i ** 5)
    if a:
        print(a, i)
        break
    a = f(X - i ** 5)
    if a:
        print(a, -i)
        break

Solution (Python):
X = int(input())






for i in range(-200,200):
    for j in range(-200,200):
        A = i
        B = j
        Ans = A**5-B**5
        if Ans == X:
            print(A," ",B)
            break
    else:
        continue
    break

Solution (Python):
M=120
c=M*M
exec(c*2*f'i,j=c%M,c//M;c-=i**5-j**5!={input()}or exit(print(i,j));')

Solution (Python):
X = int(input())

for A in range(-118, 120):
    Ap = A * A * A * A * A
    for B in range(-119, 119):
        Bp = B * B * B * B * B
        if Ap - Bp == X:
            break
        elif Ap - Bp == -X:
            A, B = B, A
            break
    else:
        continue
    break
print(A, B)

Solution (Python):
import numpy as np
X = int(input())
x = np.arange(-300,300,dtype= np.int64)
diff = np.subtract.outer(x**5,x**5)

i = np.where(diff == X)

A,B = i[0][0]-300,i[1][0]-300
print(A,B)

Solution (Python):
c=24000
exec(c*2*f'i,j=c%200,c//200;i**5-j**5-{input()}or exit(print(i,j));c-=1;')

Solution (Python):
import sys 
x = int(input())

for a in range(1001):
    for b in range(-1000,1001):
        if x == a**5 - b**5:
            print(a,b)
            sys.exit()

Solution (Python):

import sys


def sqrt5(n):
    negative = True if n < 0 else False
    for i in range(1000):
        if i ** 5 == abs(n):
            if negative:
                return -i
            return i


def solve(X: int):
    pos = {x ** 5 for x in range(1000) if x ** 5 <= int(1e15)}
    neg = {-x for x in pos}
    nums = pos.union(neg)
    for a in nums:
        
        if a - X in nums:
            b = a - X
            print(sqrt5(a), sqrt5(b))
            return
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    X = int(next(tokens))  
    solve(X)


if __name__ == "__main__":
    main()

Solution (Python):
x = int(input())

ans = 1
for i in range(-5000, 5000):
    if ans == 0:
        break
    for j in range(-5000, 5000):
        if i**5 - j**5 == x:
            print(i, j)
            ans = 0
            break

Solution (Python):
import sys
 
x = int(input())
 
 
def make_divisors(n):
    divisors = []
    for i in range(1, int(n ** 0.5) + 1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n // i)
 
    
    return divisors
 
 
for i in range(len(make_divisors(x))):
    for j in range(130):
        if j ** 5 - (j - make_divisors(x)[i]) ** 5 == x:
            print(j, j - make_divisors(x)[i])
            sys.exit()

Solution (Python):
import sys
x = int(input())
for i in range(-118,119):
  for j in range(-119,118):
    if i**5-j**5 == x:
      print(i,j)
      sys.exit()

Solution (Python):
a=int(input())
b=[]
for i in range(-150,150):
    for j in range(-150,150):
        if i**5-j**5==a:
            b.append(i)
            b.append(j)
            break
print(b[0],b[1])

Solution (Python):
a = -118;
c = 0;
d = 0;
x = int(input());

while a <= 119:
    b = -118
    while b <= 119:
        y = a**5 - b**5;
        if y == x :
            c = a;
            d = b;
        b = b + 1;
    
    a = a + 1;


print(c, d);

Solution (Python):
x = int(input())

for i in range(-1000, 1000):
    for j in range(-1000, 1000):
        if pow(i,5) - pow(j,5) == x:
            print(i, j)
            exit()

Solution (Python):
X=int(input())
five=[i**5 for i in range(1000) ]
flg=0
for i in range(len(five)):
    for j in range(len(five)):
        if five[i]+five[j]==X:
            flg=1
            ans_1=i
            ans_2=-j
        if five[i]-five[j]==X:
            ans_1=i
            ans_2=j
print(ans_1,ans_2)

Solution (Python):
X = int(input())

for i in range(-118, 120):
  for j in range(-119, i):
    if i**5 - j**5 == X:
      A = i
      B = j
    if j**5 - i**5 == X:
      B = i
      A = i

print('{} {}'.format(A, B))

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

Solution (Python):
def main():
    x = int(input())
    ok = False
    for b in range(-200, 201):
        for a in range(b + 1, 201):
            if a ** 5 - b ** 5 == x:
                print(a, b)
                ok = True
                break
        if ok:
            break


if __name__ == "__main__":
    main()

Solution (Python):
def solve():
    x = int(input())
    for i in range(-1000, 1000):
        for j in range(-1000, 1000):
            if i**5-j**5 == x:
                print(i, j)
                quit()
    return 0

if __name__ == "__main__":
    solve()

Solution (Python):
def main():
    X = int(input())
    A = 0
    B = 0
    while True:
        A += 1
        for B in reversed(range(A*(-1)+1,A)):
            
            if A**5 - B**5 == X:
                print(A,B)
                return

if __name__ == '__main__':
    main()

Solution (Python):
X = int(input())

A = []
B = []
for a in range(-118, 120):
    for b in range(-118, 120):
        if (a ** 5 - b ** 5) == X:
            A.append(a)
            B.append(b)

print(A[0], B[0])

Solution (Python):

import math

def isAnswer(a, b, X):
    return int(math.pow(a, 5) - math.pow(b, 5)) == X

def pow5(x):
    if x < 0:
        return -1 * math.pow(abs(x), 5)
    return math.pow(x, 5)

def resolver(X):
    for b in range(-300, 300):
        a5 = X + pow5(b)
        if a5 < 0:
            continue
        a = int(math.pow(a5, 0.2))
        if isAnswer(a, b, X):
            return a, b 
    return 0, 0

def main():
    X = int(input())
    a,b = resolver(X)
    print(a, b)

if __name__ == '__main__':
    main()

Solution (Python):
x = int(input())

ans = 0
for a in range(-200, 200):
    for b in range(-200, 200):
        if a**5 - b**5 == x:
            ans = [a, b]
            break
    if ans != 0:
        break
print(ans[0], ans[1])

Solution (Python):
X=int(input())
flg=False
for A in range(-120,120):
    for B in range(-120,120):
        if A**5-B**5==X:
            print(str(A)+" "+str(B))
            flg=True
            break
    if flg:
        break

Solution (Python):
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
from bisect import bisect_left,bisect_right 
import sys,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

x = inp()
for i in range(-2000,2000):
    for j in range(-2000,2000):
        if pow(i,5) - pow(j,5) == x:
            print(i,j)
            quit()

Solution (Python):
X = int(input())

def search(x):
    for A in range(-1000, 1000):
        for B in range(-1000, 1000):
            A5 = A**5
            B5 = B**5
            if A5 - B5 == x:
                print(A, B)
                return

search(X)

Solution (Python):
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()

Solution (Python):
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(0)

Solution (Python):
x = int(input())
for i in range(238):
  a = i-118
  for j in range(238):
    b = j-119
    if a**5-b**5==x:
      print(a, b)
      exit()

Solution (Python):
x = int(input())

for a in range(-117, 120):
    for b in range(-117, 120):
        if x == a**5 - b**5:
            print(a, b)
            break
    else:
        continue
    break

Solution (Python):
x=int(input())
for a in range(200):
  for b in range(-200,200):
    if a**5-b**5==x:
      print(a,b,sep=' ')
      exit()

Solution (Python):
X = int(input())

M = 21148

ns = [i**5 for i in range(M)]
n5s = {i**5:i for i in range(M)}

result = None
for i in range(M):
    b = ns[i]
    if b + X in n5s:
        result = n5s[b + X], i
    if X - b in n5s:
        result = i, -n5s[X - b]

print(*result)

Solution (Python):
X = int(input())

for b in range(-1000, 1000, 1):
    for a in range(b, 1000, 1):
        if a ** 5 - b ** 5 == X:
            print(a, b)
            exit()

Solution (Python):
import math
import sys

x = int(input())


max_a = math.floor(x ** (1/5))
for i in range(max_a,-1,-1):
    b5 = x - (i ** 5)
    b = round(b5 ** (1/5), 5)
    if b.is_integer():
        print(i,int(-1 * b))
        sys.exit()

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

Solution (Python):
def main():
    X=int(input())
    start=0
    back=-1
    while(True):
        back=X-pow(start,5)
        if back>0:
            A_back=int(pow(back,1/5))
        else:
            A_back=-int(pow(-back,1/5))

        front=X+pow(start,5)
        if front>0:
            A_front=int(pow(front,1/5))
        else:
            A_front=-int(pow(-front,1/5))
        if(pow(A_back,5)==back):
            A=A_back
            B=-start
            break
        elif(pow(A_front,5)==front):
            A=A_front
            B=start
            break
        else:
            start+=1
    print(A,B)
if __name__=='__main__':
    main()

Solution (Python):
x = int(input())

for a in range(-118, 120):
    for b in range(-119, 118):
        if x == a ** 5 - b ** 5:
            print(a, b)
            exit()

Solution (Python):
x = int(input())

for a in range(-118, 120):
    for b in range(-118, 120):
        if x == a ** 5 - b ** 5:
            print(a, b)
            exit()

Solution (Python):
X = int(input())
A = 0
B = 0
for i in range(-200,200):
    for j in range(-200,200):
        if X == i**5-j**5:
            A=i
            B=j

print(A,B)

Solution (Python):
X = int(input())
flg = False
for A in range(120):
    Ap = A**5
    for B in range(120):
        Bp = B**5
        if Ap-Bp==X:
            print(A,B)
            flg = True
            break
        elif Ap+Bp==X:
            print(A,-B)
            flg = True
            break
    if flg:
        break

Solution (Python):
x=int(input())
for i in range(-200,200):
  for j in range(-200,200):
    if i**5-j**5==x:
      a=i
      b=j
print(a,b)

Solution (Python):

X = int(input())

nukeru=0
for a in range(-400,401):
    for b in range(-400,401):
        if a**5 - b**5 == X:
            print(a,b)
            nukeru=1
        if nukeru==1:
            break
    if nukeru==1:
        break

Solution (Python):
X = int(input())

for i in range(1, 10**3):
    for j in range(i):
        if i**5 - j**5 == X:
            print(i, j)
            exit()
        elif i**5 + j**5 == X:
            print(i, -j)
            exit()

Solution (Python):
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()

Solution (Python):
X = int(input())
break_flag = 0
for i in range(120):
  for j in range(i):
    a, b = i, j
    if a**5 - b**5 == X:
      print(a, b)
      break_flag = 1
      break
    elif a**5 + b**5 == X:
      print(a, -b)
      break_flag = 1
      break
  if break_flag == 1:
    break

Solution (Python):
x = int(input())
for a in range(-500, 500):
    for b in range(-500, 500):
        n = a ** 5 - b ** 5
        if n == x:
            print(a, end=" ")
            print(b)
            break
    else:
        continue
    break

Solution (Python):
X = int(input())
break_flag = 0
for i in range(1000):
  for j in range(i):
    a, b = i, j
    if a**5 - b**5 == X:
      print(a, b)
      break_flag = 1
      break
    elif a**5 + b**5 == X:
      print(a, -b)
      break_flag = 1
      break
  if break_flag == 1:
    break

Solution (Python):
x=int(input())

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

Solution (Python):
x = int(input())


for i in range(-1000,1000):
    s = x + pow(i,5)
    t = pow(s,0.2)
    if(t.imag == 0):
        t = int(t)
        if(pow(t,5) == s):
            print(t,i)
            exit()