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

i = 0
ans = 0
while ans <= 1000000000:
   i += 1
   ans = i**5 - (i-1)**5



i = 0
ans = 0
while ans <= 1000000000:
   i -= 1
   ans = i**5 - (i-1)**5 


n = int(input())
l = [_**5 for _ in range(120)]

for i in range(1,120):
    for j in range(120):
        if l[i] - l[j] == n:
            print(int(l[i]**0.2), int(l[j]**0.2))
            exit()
        if l[i] + l[j] == n:
            print(int(l[i]**0.2), int(-1*l[j]**0.2))
            exit()

Solution (Python):
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(i,j)
            sys.exit()

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

Solution (Python):


X=int(input())

div=[1,X]

for i in range(2,X):
    if X%i==0:
        div.append(i)
        div.append(X//i)
    if i*i>=X:
        break

for d in div:
    for j in range(-100000,100000):
        A=j+d
        B=j
        if A**5-B**5==X:
            print(str(A)+" "+str(B))
            exit(0)

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)
            break
    else:
        continue
    break

Solution (Python):
def calc(a, b):
  return a ** 5 - b ** 5

x = int(input())
even = 0
if x % 2 == 0:
  even = 1
flag = 0
if even:
  a = 2
else:
  a = 1
b = 0
while (True):
  while (True):
    if calc(a,b) == x:
      flag = 1
      break
    elif calc(a,b) > x:
      break
    b -= 2
  if flag == 1:
    break
  a += 1
  if even:
    b = a - 2
  else:
    b = a - 1
print(a, b)

Solution (Python):
def main():
    x = int(input())
    a = 1
    b = 1
    
    for i in range(-118, 120):
        a = i
        for j in range(-118, 120):
            b = j
            if x == a**5 - b**5:
                ans = str(a) + ' ' + str(b)
                print(ans)
                return


if __name__ == '__main__':
    main()

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

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

Solution (Python):

M = 1000
N = [0]
for i in range(1,M+1):
    N.append(i)
    N.append(-i)

def main(X):
    global N
    for i in N:
        for j in N:
            if i**5-j**5==X:
                return i,j

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

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

Solution (Python):
import numpy as np

X=int(input())
ans=[0,0]

for i in range(-120,120):
  a=i
  for j in range(-120 , 120):
    b=j
    if (a**5 - b**5) ==X:
      ans[0]=a
      ans[1]=b

print("{} {}".format(ans[0],ans[1]))

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

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

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

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):
'''
5乗なのでグラフは十分疎である
AとBが連続する整数(B = A-1)だった時の値で絞り込む
A^5-(A-1)^5 の値はA=120で今回のX=10^9を超える
同様に下限はA=-119である
その時のBの範囲も、与式>=1によりA-B>0だから同様の範囲だろうと推測できる
'''

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

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

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


def f(X):

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


f(X)

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

div_list = []
for a in range(1, int(X**0.5)+1):
    if X % a == 0:
        div_list.append((a, X//a))


for x, y in div_list:
    for a in range(int(X**0.5)+1):
        b = a - x
        
        y_hat = a**4 + b*a**3 + b**2*a**2 + b**3*a + b**4
        
        if y_hat == y:
            print(a, b)
            exit()

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

for i in range(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())
d= {}
for a in range(10**25):
    
    a5 = a**5
    b5 = a5-x
    if b5 in d:
        print(a,d[b5])
        exit()
    d[a5] = a
    
    a5 = -a5
    b5 = a5-x
    if b5 in d:
        print(a,d[b5])
        exit()
    d[a5] = -a

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)
      exit()

Solution (Python):
import math
 
x = int(input())
 
for a in range(-300,300):
  for b in range(-300,300):
    if a**5 - b**5 == x:
      print(a,b)
      exit()

Solution (Python):
import math
 
x = int(input())
x_pow = round(math.pow(x, 1/5))
ok = 0
 
for a in range(-300,300):
  for b in range(-300,300):
    if a**5 - b**5 == x:
      print(a,b)
      ok = 1
      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(-130,130):
  for b in range(-130,130):
    if a**5 - b**5 == x:
      print(a,b)
      exit()

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

for a in range(121):
    for b in range(121):
        if a ** 5 - b ** 5 == X:
            print(a, b)
            break
        elif a ** 5 + b ** 5 == X:
            print(a, -b)
            break
    else:
        continue
    break

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

facts = [0]
n = 1
while True:
    facts.append(n ** 5)
    if facts[-1] - facts[-2] > X:
        break
    n += 1

facts = set(facts)

for f0 in facts:
    f1 = None
    if abs(f0 - X) in facts:
        f1 = abs(f0 - X)
        r0 = int(f0 ** 0.2)
        r1 = int(f1 ** 0.2)
        if f0 - f1 == X:
            print(r0, r1)
        else:
            print(r0, -r1)
        break

Solution (Python):
import sys
def I(): return int(sys.stdin.readline().rstrip())

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

if __name__=='__main__':
    Main()

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

Solution (Python):
from math import sqrt
x = int(input())

ps = []
for i in range(1, int(sqrt(x)) + 1):
  if x % i == 0:
    ps.append(i)
    ps.append(x // i)

for p_ in ps:
  for p in (-p_, p_):
    for r in (-1, 1):
      for s in (-1, 1):
        try:
            a = (p + r * sqrt(-5 * p**2 + s * (2 * sqrt(5) *
                                              sqrt(p ** 6 + 4 * p * x)) / p) / sqrt(5)) / 2
            if abs(a - round(a)) < 1e-6:
              a = round(a)
              print(a, a - p)
              exit()
        except ValueError:
          pass

Solution (Python):
x=int(input())
flag=False
for a in range(121):
  for b in range(-121,121):
    if(a**5-b**5==x):
      flag = True
      break
  if(flag==True):
    break
print(a,b)

Solution (Python):
import sys
X=int(input())
X5=X**0.2

if X5-int(X5)==0:
    a=int(X5)
    b=0
    print(a,b)
    
    sys.exit()
for a in range(1,int(X5)+1):
    for mb in range(a):
        if a**5+mb**5==X:
            print(a,-mb)
            
            sys.exit()
for a in range(1,2*int(X5)):
    for b in range(a):
        if a**5-b**5==X:
            print(a,b)
            
            sys.exit()

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

flag = 0

for a in range(x):
    b5 = a**5 - x
    for b in range(120):
        if abs(b5) == int(b**5):
            if b5 < 0:
                b = -b
            flag = 1
            break
    if flag:
        break

print(a, int(b))

Solution (Python):
n = int(input())
tp = ((1,1),(1,-1))
for i in range(200):
    for j in range(200):
        for k in tp:
            a,b = i*k[0],j*k[1]
            if((a**5 - b**5)==n):
                print(a,b)
                exit()

Solution (Python):
def calc(X):
    A = 1
    B = 1
    if X == 0:
        return A,B
    else:
        l_bound = 1
        h_bound = 200
        for i in range(l_bound,h_bound):
            for j in range(0,i+1):
                if i ** 5 - j ** 5 == X:
                    A = i
                    B = j
                    return A,B
                if i ** 5 + j ** 5 == X:
                    A = i
                    B = -j
                    return A,B
def resolve():
    X = int(input())
    A,B = calc(X)  
    print(str(A) + " " + str(B))
resolve()

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

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


if __name__ == '__main__':
    main()

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

Solution (Python):
X=int(input())
MAX=2*int(X**(1/5))+1
MIN=-2*int(X**(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()

Solution (Python):
X=int(input())
MAX,MIN=0,0
diff=0
while diff<=10**9:
    MAX+=1
    diff=MAX**5-(MAX-1)**5
diff=0
while diff<=10**9:
    MIN-=1
    diff=MIN**5-(MIN-1)**5
for A in range(MIN,MAX):
    for B in range(MIN,MAX):
        if A**5-B**5==X:
            print(A,B)
            exit()

Solution (Python):
x = int(input())
for i in range(500):
    for j in range(-500, 500):
        if i**5 - j**5 == x:
            print(i,j)
            break
    else:
        continue
    break

Solution (Python):
import math
def fact(n):
    ans = 1
    for i in range(2, n+1):
        ans*= i
    return ans
def comb(n, c):
    return fact(n)//(fact(n-c)*c)

x = int(input())
a = 0
b = 0
done = False
for f in range(-300, 300):
    for l in range(-300, 300):
        if((f**5)-(l**5)==x):
            a = f
            b = l
            done = True
            break
    if(done):
        break
print(a,b)

Solution (Python):
x = int(input())
for i in range(1,1500):
    for j in range(-1000,1000):
        y = i**5 - j**5
        if x == y:
            print(i,j)
            exit()

Solution (Python):
def main():
    X = int(input())
    Y = 2*int(X**(1/5))+1
    for A in range(-Y,Y):
        for B in range(-Y,Y):
            if A**5 - B**5==X:
                return A,B

if __name__ == "__main__":
    A,B=main()
    print("{} {}".format(A,B))

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


for a in range(1000):
    for b in range(-1000, 1000):
        if pow(a, 5) - pow(b, 5) == X:
            print(a,b)
            sys.exit( )

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

n = 0

big = 0
small=0



while True:

   if (n**5 - (n-1)**5) > 10**9 :
     break
   big=n
   n += 1

n=0
while True:
   if (n**5 - (n-1)**5) > 10**9 :
     break
   small=n
   n -= 1

a = list(range(0, big,   1))+list(range(-1, small-1, -1))
b = list(range(0, big-1, 1))+list(range(-1, small-2, -1))

stopFlag = False
for ia in a:
   if stopFlag :
      break
   for ib in b:

     if (ia**5) - (ib**5) == X:
        print(ia, ib)
        stopFlag = True
        break

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

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

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

if __name__ == "__main__":
    main()

Solution (Python):
import glob
import bisect


REL_PATH = 'ABC\\166\\D'


TOP_PATH = 'C:\\AtCoder'

class Common:

    problem = []
    index = 0

    def __init__(self, rel_path):
        self.rel_path = rel_path

    def initialize(self, path):
        file = open(path)
        self.problem = file.readlines()
        self.index = 0
        return

    def input_data(self):
        try:
            IS_TEST
            self.index += 1
            return self.problem[self.index-1]

        except NameError:
            return input()

    def resolve(self):
        pass

    def exec_resolve(self):
        try:
            IS_TEST
            for path in glob.glob(TOP_PATH + '\\' + self.rel_path + '/*.txt'):
                print("Test: " + path)
                self.initialize(path)
                self.resolve()
                print("\n\n")
        except NameError:
            self.resolve()


class Solver(Common):

    def calc(self, num):
        if num < 2:
            return 0
        return num * (num-1) / 2

    def resolve(self):

        X = int(self.input_data())

        squares = [0]*401
        for i in range(0,401):
            squares[i] = (i-200) ** 5

        finish = False
        for i in range (1,401):
            for j in range(0,400):
                if squares[i] - squares[j] == X:
                    print(str(i-200) + ' ' + str(j-200))
                    finish = True
                    break
            if finish:
                break


solver = Solver(REL_PATH)
solver.exec_resolve()

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

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



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

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

Solution (Python):
x = int(input())
y = x
if x == 1:
    print('0 -1')
    exit()
v = []
for i in range(0,1001):
    v.append(i*i*i*i*i)
    v.append(i*i*i*i*i*-1)
c = 0
d = 0
for i in range(len(v)):
    y -= v[i]
    for j in range(len(v)):
        if v[j] == y * -1:
            c = i
            d = j
            break
    y = x
if c % 2 == 0: c //= 2
else:
    c = (c-1) // 2
    c *= -1
if d % 2 == 0: d //= 2
else:
    d = (d-1) // 2
    d *= -1
print(c,d)

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

if __name__ == "__main__":
    main()

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

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

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

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

X = INT()

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

Solution (Python):
import sys
input = lambda: sys.stdin.readline().rstrip()
 
x=int(input())
a=1
while True:
    for b in range(a + 1):
        if a**5+b**5==x:
            print(a,-b)
            sys.exit()
        elif a**5-b**5==x:
            print(a,b)
            sys.exit()
    else:
        a+=1

Solution (Python):
import sys

def solve():
    input = sys.stdin.readline
    X = int(input())
    fin = False
    for i in range(-1000, 1001):
        for j in range(-1000, 1001):
            if pow(i, 5) - pow(j, 5) == X:
                print(i, j)
                fin = True
                break
        if fin: break
    else: print(-1)

    return 0

if __name__ == "__main__":
    solve()

Solution (Python):
X = int(input())
N = int(X**(1/5))
ans = [0,0]
for i in range(-2*N-1, 2*N+2):
  for j in range(-2*N-1, 2*N+2):
    if i**5-j**5==X:
      ans = [i, j]
ans = [str(i) for i in ans]
ans = ' '.join(ans)
print(ans)

Solution (Python):
X = int(input())
for i in range(1,int(X**0.5)+1):
    if X%i==0:
        a = i
        b = X//i
        flag = 0
        for j in range(-1000,1000):
            B = j
            A = j+a
            if A**4+A**3*B+A**2*B**2+A*B**3+B**4==b:
                print(A,B)
                flag = 1
                break
        if flag==1:break
        a = X//i
        b = i
        flag = 0
        for j in range(1,1000):
            B = j
            A = j+a
            if A**4+A**3*B+A**2*B**2+A*B**3+B**4==b:
                print(A,B)
                flag = 1
                break

Solution (Python):
from sys import stdin
def main():
    
    readline=stdin.readline
    x=int(readline())
    flag=False
    for a in range(-200,201):
        for b in range(-200,201):
            if a**5-b**5==x:
                print(a,b)
                flag=True
                break
        if flag: break

if __name__=="__main__":
    main()

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

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

Solution (Python):
x = int(input())
for a in range(-10**3, 10**3+1):
    for b in range(-10**3, 10**3+1):
        if a**5-b**5 == x:
            print(a, b)
            exit()

Solution (Python):






from collections import defaultdict











import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
x = I()
for a in range(-1005,1005,1):
    for b in range(-1005,1005,1):
        if pow(a,5) - pow(b,5) == x:
            print(a,b)
            exit()

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

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

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


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

Solution (Python):
X =int(input())
def jug(n):
    if n>0:
        return 1
    else:
        return -1

ALL = [i**5 for i in range(-200,200+1)]
for a in ALL:
    for b in ALL:
        if a-b ==X:
            ans =[jug(a)*int(abs(a)**(1.0/5)),jug(b)*int(abs(b)**(0.2))]
            print(ans[0],ans[1])
            exit()

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


if __name__ == '__main__':
    main()

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


if __name__ == '__main__':
    main()

Solution (Python):
num=(int)(input())
for i in range(-64, 121):
  for j in range(-64, 121):
    if i**5-j**5== num:
      print(i, j)
      break
  else:
    continue
  break

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

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

















maxA = 126
maxX = pow(10, 9)

flag = 0
for A in range(-126, 126):
    for B in range(-127, A):
        result = pow(A, 5) - pow(B, 5)
        if result > maxX:
            next
        if result == X:
            print(A, B)
            flag = 1
            break
    if flag == 1:
        break

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

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

Solution (Python):
from collections import defaultdict

d = defaultdict(list)
for i in range(-120, 121):
  for j in range(-120, 121):
    x = i**5 - j**5
    if x >= 1:
      d[x] = [i, j]
    
X = int(input())

print('{0[0]} {0[1]}'.format(d[X]))

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

Solution (Python):
x = int(input())
def f(a,b):
    return a**5-b**5

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

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

Solution (Python):
X = int(input())
import sys
for a in range(-118, 120, 1):
    for b in range(-119, 119, 1):
        if X == pow(a,5) - pow(b,5):
            print(a, b)
            sys.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())
y =10**5
a ={i**5 for i in range(-y,y)}
ans_a =0
ans_b =0
for b in range(-y,y):
    if X +b**5 in a:
        
        if X +b**5 >0:
            ans_a =int( (X +b**5 )**0.2 )
        else:
            ans_a = -int( abs(X +b**5 )**0.2 )
        ans_b =b
        break
print(ans_a,ans_b)

Solution (Python):
X = int(input())
y =120
a ={i**5 for i in range(-y,y)}
ans_a =0
ans_b =0
for b in range(-y,y):
    if X +b**5 in a:
        
        if X +b**5 >0:
            ans_a =int( (X +b**5 )**0.2 )
        else:
            ans_a = -int( abs(X +b**5 )**0.2 )
        ans_b =b
        break
print(ans_a,ans_b)

Solution (Python):

import sys

X = int(input())
a = [i for i in range(-119, 120)]
b = [i for i in range(-119, 120)]

for i in a:
    for k in b:
        if i**5 == X + k**5:
            print(i,k)
            sys.exit()

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

Solution (Python):
x = int(input())
a = [i for i in range(120)] + [-i for i in range(1,119)]
b = [i for i in range(119)] + [-i for i in range(1,120)]

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

Solution (Python):
X =int(input())
for A in range(120):
    for B in range(-120,120):
        if X == pow(A,5)-pow(B,5):
            AA =A
            BB =B
            break

print(AA,BB)

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

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

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

Solution (Python):
"""
- I hate Factorization
- A**5 - B**5, >0 A>B (Bminusあり)
"""
X = int(input())
 
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

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



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

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

Solution (Python):



def main():
    import sys
    input = sys.stdin.readline

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

    print(-1)


if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
import sys
from functools import lru_cache
from collections import defaultdict
inf = float('inf')
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**6)
def input(): return sys.stdin.readline().rstrip()
def read():
  return int(readline())
def reads():
  return map(int, readline().split())
x=read()
ls=[]
nums=10**3
ls2=[]
for i in range(nums+1):
  ls.append(i**5)
for i in range(nums,0,-1):
  ls.append(-i**5)

for i in range(nums+1):
  for j in range(-nums,i):
    
    if ls[i]-ls[j]==x:
      print("{} {}".format(i,j))
      exit()

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

if __name__ == "__main__":
    main()

Solution (Python):
import sys


def main():
    read = lambda: sys.stdin.readline().rstrip()
    import collections
    
    X = int(read())
    for A in range(-120, 120):
        flag = False
        for B in range(-120, 120):
            if X == A**5-B**5:
                print(A, B)
                flag = True
                break
        if flag: break
    


if __name__ == "__main__":
    main()

Solution (Python):
x = int(input())
for a in range(-118, 120):
    for b in range(-118, 119):
        if pow(a, 5) - pow(b, 5) == x:
            print(str(a) + " " + str(b))
            exit()

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

if x == 1:
    a = 1
    b = 0
else:
    p = 1
    while True:
        while True:
            if x % p == 0:
                q = int(x / p)
                break
            else:
                p += 1
        ap = p
        am = p
        bp = 0
        bm = 0
        for i in range(200):
            if ap**4 + ap**3 * bp + ap**2 * bp**2 + ap * bp**3 + bp**4 == q:
                a = ap
                b = bp
                break
            elif am**4 + am**3 * bm + am**2 * bm**2 + am * bm**3 + bm**4 == q:
                a = am
                b = bm
                break
            ap += 1
            bp += 1
            am -= 1
            bm -= 1
        else:
            p += 1
            continue
        break

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

Solution (Python):
import sys
import itertools

import time
import math

sys.setrecursionlimit(10 ** 7)

from collections import defaultdict

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

x = int(input())

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

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

print(str(A)+str(" ")+str(B))

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(n) for n in input().split()]

L = 200




for i in range(L+1):
    for j in range(L+1):
        if i ** 5 - j ** 5 == X:
            print('{} {}'.format(i, j))
            exit()
        elif i ** 5 + j ** 5 == X:
            print('{} {}'.format(i, -j))
            exit()

Solution (Python):

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

Solution (Python):

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

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

MAX_INT = 201

res = 0

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

    if i**5 + j**5 == X:
      print(i,-j)
      exit()

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

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


a_max = int(X**0.2) + 1
b_min = - a_max
for a in range(a_max + 1):
    for b in range(0, b_min - 1, -1):
        if a**5 == X + b**5:
            print(a, b)
            exit()


a_max = int(X**0.25) + 1
b_max = a_max

for a in range(a_max + 1):
    for b in range(b_max + 1):
        if a**5 == X + b**5:
            print(a,b)
            exit()

Solution (Python):
x = int(input())
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)

Solution (Python):
import sys

x = int(input())

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

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

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

Solution (Python):
x = int(input())
a = 0
b = 0
if not x == 0:
  for i in range(1000):
    for j in range(-100,1000):
      if i**5 - j**5 == x:
        a = i
        b = j
      if a != 0 or b != 0:
        break
    if a != 0 or b != 0:
        break
    
print(str(a)+" "+str(b))