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

X = int(input())
flag = True
for a in range(-200, 200):
    for b in range(-200, 200):
        if a ** 5 - b ** 5 == X and flag:
            print(a, b)
            flag = False

Solution (Python):


def main():
    X = int(input())
    
    lis = [[ [] for _ in range(240)] for _ in range(240)]
    ansA, ansB = 0, 0
    
    for i in range (240):
        for j in range(240):
            lis[i][j].append(i-120)
            lis[i][j].append(j-120)
    
    for i in range(240):
        for j in range(240):
            A, B = lis[i][j]
            if A**5 - B**5 == X:
                ansA, ansB = A, B
                break
        else: 
            continue
        break 


    print(ansA, ansB)


if __name__ == '__main__':
    
    main()

Solution (Python):
X = int(input())
answer = (1001,1001)
for A in range(-1000, 1000):
    for B in range(-1000, 1000):
        if A ** 5 - B ** 5 == X:
            answer = (A, B)
            break
    if answer[0] != 1001:
        break
print(' '.join(map(str, answer)))

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

print(A, B)

Solution (Python):

x = int(input())
y = int(pow(x, 1/5))*2
A = [i**5 for i in range(y+1)]
B = [i**5 for i in range(y+1)]

for i in range(len(A)):
  for j in range(len(B)):
    if ( A[i] + B[j] ) == x:
      if A[i] > B[j]:
        exit(print(i, -j))
      else:
        exit(print(j, -i))
    elif ( A[i] - B[j] ) == x:
      exit(print(i, j))

Solution (Python):


import math
x = int(input())


border = 1;
while border ** 5 - (border - 1) ** 5 < x:
    border += 1

for i in range(border + 1):
    aa = ((x + i ** 5) ** (1.0 / 5.0)) 
    a = round(aa)
    if a ** 5 - i ** 5 == x:
        b = i
        print(a, b)
        break
else:
    b = -1

    while x + b ** 5 >= 0:

        aa = ((x + b ** 5) ** (1.0 / 5.0))  
        a = round(aa)
        if a ** 5 - b ** 5 == x:
            print(a, b)
            break
        b -= 1

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

Solution (Python):
import sys 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
X = int(readline())
for a in range(-119,121):
    for b in range(-119,121):
        if (a**5-b**5) == X:
            print(a,b)
            sys.exit()

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

for a in range(-200,201):
    for b in range(-200, 201):
        if a**5 - b ** 5 == x:
            ans = True
            break
    if ans:
        break
print(a,b)

Solution (Python):
import sys 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
X = int(readline())
def make_divisors(n):
    lower_divisors = []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
        i += 1
    return lower_divisors 

A = make_divisors(X)
for a in A:
    for b in range(10**3,-(10**3),-1):
        Y = X // a
        if ((b+a)**4 + b*(b+a)**3 + b**2*(b+a)**2 + b**3*(b+a) + b**4) == Y:
            print(b+a,b)
            sys.exit()

Solution (Python):
import sys

x = int(input())

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

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

x = int(readline())

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

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


for i in range(-200, 200):
    for j in range(-200, 200):
        if i**5 - j**5 == X:
            print("{} {}".format(i, j))
            exit()

Solution (Python):

from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


def sum_of_arithmetic_progression(s, d, n):
    return n * (2 * s + (n - 1) * d) // 2


def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)


def lcm(a, b):
    g = gcd(a, b)
    return a / g * b


def solve(X):
    for A in range(-500, 510):
        for B in range(-500, 510):
            if A ** 5 - B ** 5 == X:
                return A, B
    return None, None

def main():
    X = int(input())
    print(*solve(X))


if __name__ == '__main__':
    main()

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

Solution (Python):
from numba import njit


@njit
def main(X):
    for a in range(-200, 201):
        for b in range(-200, 201):
            if pow(a, 5) - pow(b, 5) == X:
                print(a, b)
                return


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

Solution (Python):
from numba import njit


@njit
def main(X):
    for a in range(-2000, 2001):
        for b in range(-2000, 2001):
            if pow(a, 5) - pow(b, 5) == X:
                print(a, b)
                return


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

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

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

Solution (Python):

import sys

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

calc = {}

for i in range(-118,120):
    calc[i] = i**5


for a in range(-118,120):
    for b in range(-118,120):
        if (calc[a] - calc[b]) == X:
            print(a,b)
            sys.exit()

Solution (Python):

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

Solution (Python):
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())
n=100
tes = [0]
for i in range(-250,250):
    for j in range(-250,250):
        if pow(i,5) - pow(j,5) == x:
            print(str(i)+" "+str(j))
            exit()

Solution (Python):






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

    p = []
    def pow5(n):
        nonlocal p
        if len(p) > n:
            return p[n]
        ans = pow(n,5)
        p += ans,
        return ans

    a = 0
    b = 0
    while True:
        if abs(X) + pow5(b) == pow5(a) or abs(X) - pow5(b) == pow5(a) :
            a5 = pow5(a)
            b5 = pow5(b)
            if X == a5 - b5:
                print(a,b)
            elif X == a5 + b5:
                print(a, -b)
            elif X == -a5 - b5:
                print(-a, b)
            else:
                print(-a, -b)
            return
        while abs(X) + pow5(b) > pow5(a):
            a += 1
            if abs(X) + pow5(b) == pow5(a) or abs(X) - pow5(b) == pow5(a) :
                a5 = pow5(a)
                b5 = pow5(b)
                if X == a5 - b5:
                    print(a,b)
                elif X == a5 + b5:
                    print(a, -b)
                elif X == -a5 - b5:
                    print(-a, b)
                else:
                    print(-a, -b)
                return
        a = 0
        b += 1

main()

Solution (Python):
import math

X= int(input())

for A in range(-120,121):
    for B in range(-120,A+1):
        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(-120, 120 + 1):
  for B in range(-120, 120):
    if A**5 - B**5 == X:
      print("{} {}".format(A, B))
      exit()

Solution (Python):
import os

x = int(input())

for a in range(-118,120):
    for b in range(-119,119):
        if a**5-b**5==x:
            print("{} {}".format(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:
      print(i,j)
      exit()

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

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

Solution (Python):
from collections import deque

def getInts():
    return [ int(x) for x in input().split() ]

def f(A,B):
    return A**5 - B**5

[X] = getInts()
Q = deque([(0,0)])
V = set()
A, B = 0,0
r = []
while not r:
    (A,B) = Q.pop()
    l = [(A+1,B),(A,B+1),(A+1,B+1)]
    l = filter(lambda x: x not in V, l)
    for each in l:
        V.add(each)
        Q.appendleft(each)
    
    r = list(filter(lambda x: f(*x)==X, [(A,B), (A,-B), (-A,B), (-A, -B)]))

print(r[0][0], r[0][1])

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

if __name__ == "__main__":
    main()

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

Solution (Python):
x = int(input())
d = {}
for i in range(1000):
  b = (-1000+i)**5
  d[b] = -1000+i
for i in range(1000):
  a = i**5
  d[a] = i
  if a-x in d:
    b = d[a-x]
    a = i
    break
print(a,b)

Solution (Python):
x = int(input())
l = []
d = {}
for i in range(1000):
  b = (-1000+i)**5
  d[b] = -1000+i
for i in range(1000):
  a = i**5
  d[a] = i
  if a-x in d:
    b = d[a-x]
    a = i
    break
print(a,b)

Solution (Python):
import sys

input = sys.stdin.readline


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

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


if __name__ == "__main__":
    main()

Solution (Python):
def main():  
  x = int(input())
  a = 1
  while True:
    c = a**5
    for b in range(-a,a+1):
      d = c - b**5
      if d == x:
        print(a,b)
        return
      if d == -x:
        print(b,a)
        return
    a+=1
  
if __name__ == "__main__":
  main()

Solution (Python):
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7


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

Solution (Python):
def main():
    x = int(input())
    a, b = 1, 0

    while True:
        for b in reversed(range(-a + 1, a)):
            
            q = a**5 - b**5
            if q == x:
                print(f'{a} {b}')
                return
        a += 1

main()

Solution (Python):

x = int(input())

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

factorization(x)

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

for a in range(150):
  for b in range(150):
    if a**5 - b**5 == X:
      print(a, b)
      sys.exit()
    elif a**5 + b**5 == X:
      print(a, -b)
      sys.exit()

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

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

X = int(input())

A = 1
B = 0

while True:
    while A**5 - B**5 < X:
        B -= 1
    if A**5 - B**5 == X:
        print(A,B)
        exit()
    B = A
    A += 1

Solution (Python):
import math

x = int(input())
for i in range(1, 121):
    for j in range(-120, 121):
        if i**5 - j**5 == x:
            print(i, j)
            quit(0)

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

for A in range(-120, 120):
    for B in range(-120, 120):
        if A**5 - B**5 == X:
            flag = True
            break
    if flag:
        break

print(A, B)

Solution (Python):
n = int(input())
for i in range(-1200,1200):
  for j in range(-1200,1200):
    if (i**5-j**5 == n):
      print(i,end=" ")
      print(j)
      exit()

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

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

print(*ans)

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

Solution (Python):
import sys
input = sys.stdin.readline
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)
                return

if __name__ == '__main__':
    main()

Solution (Python):
x = int(input())
aa, bb = 0, 0
for i in range(-200, 200):
  for j in range(-200, 200):
    if(i**5 - j**5 == x):
      aa, bb = i, j
    if(aa != 0 or bb != 0):
      break
  if(aa != 0 or bb != 0):
    break
print(str(aa) + " " + str(bb))

Solution (Python):
import sys


def resolve(in_):
    x = int(in_.read())
    for a in range(-118, 119 + 1):
        for b in range(-118, 119 + 1):
            if x == a ** 5 - b ** 5:
                return a, b
    raise ValueError()


def main():
    answer = resolve(sys.stdin.buffer)
    print('{} {}'.format(*answer))


if __name__ == '__main__':
    main()

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

if __name__ == "__main__":
    main()

Solution (Python):

x = int(input())


def make_divisors(n):
    lower_divisors, upper_divisors = [], []
    i = 1
    while i * i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n // i)
        i += 1
    return lower_divisors


for i in make_divisors(x):
    a = 0
    while (a - i) < 0 or a**5 - (a - i)**5 < x:
        a += 1
        if a**5 - (a - i)**5 == x:
            print(a, a - i)
            exit()

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

Solution (Python):
def main():
    x = int(input())
    for A in range(-118,120):
        for B in range(-119,119):
            if (A**5 - B**5) == x:
                return([A,B])

ans = main()
print(' '.join(str(n) for n in ans))

Solution (Python):
def main():
    x = int(input())
    for A in range(-118,120):
        for B in range(-119,119):
            if (A**5 - B**5) == x:
                return([A,B])

ans = main()
print(' '.join(str(n) for n in ans))

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

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




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


def bi(num, a, b, x):
    print((a * num) + (b * len(str(b))))
    if (a * num) + (b * len(str(b))) <= x:
        return False
    return True

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


def input_list_str():
    return list(map(str, input().split()))


if __name__ == "__main__":
    main()

Solution (Python):
import sys
def Ii():return int(sys.stdin.buffer.read())
def Mi():return map(int,sys.stdin.buffer.readline().split())
def Li():return list(map(int,sys.stdin.buffer.readline().split()))

x = Ii()

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

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


for a in range(Rg):
	A = a**5
	for b in range(Rg): 
		B = b**5
		if A-B==X:
			print(a,b)
			exit()
		if A+B==X:
			print(a,-b)
			exit()

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

x = int(input())
pre = [i ** 5 for i in range(1001)] 
for i in range(1001):
    for j in range(i + 1):
        if pre[i] - pre[j] == x: print(i, j); exit()
        elif pre[i] + pre[j] == x: print(i, -j); exit()

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

B_max = int(X**(0.25))

def get_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

divisors = get_divisors(X)

flg = False
for div in divisors:
    for B in range(-B_max, B_max+1):
        A = B + div
        A4_B4 = A**4 + A**3 * B + A**2 * B**2 + A * B**3 + B**4
        
        if (div * A4_B4 == X):
            flg = True
            break
    
    if flg:
        break


print("{} {}".format(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:
      print("{} {}".format(i,j))
      exit()

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

Solution (Python):
def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

X = int(input())
S = make_divisors(X)

t = 0
for s in S:
    a = s//2
    b = a-s
    while a**5 - b**5 <= X:
        if a**5 - b**5 == X:
            print(a,b)
            break
        a += 1
        b += 1
    if a**5 - b**5 == X:
        break

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

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

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

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




for i in range(-200, 200, 1):
    for j in range(-200, 200, 1):
        if i ** 5 - j ** 5 == N:
            print(f'{i} {j}')
            exit(0)

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

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

Solution (Python):
N = int(input())
flag = 1
for a in range(-119, 119):
    for b in range(-119, 119):
        if a**5 - b**5 == N:
            A = str(a)
            B = str(b)
            flag = 0
    if flag ==0:
        break
print(A + " " +B)

Solution (Python):
import sys

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

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

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

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

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

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

for a in range(-119, 120):
    for b in range(-119, 120):
        if X == a**5 - b**5:
            la = a
            lb = b
print(la, lb)

Solution (Python):
x = int(input())
for a in range(-10 ** 3, 10 ** 3):
    for b in range(-10 ** 3, 10 ** 3):
        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(-118, 120):
        if a**5 - b**5 == X:
            print(a, b)
            break
    else:
        continue
    break

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

Solution (Python):
import math
import sys
X=int(input())
A=-200
B=-200

for i in range(400):
    for j in range(400):
        if A**5-B**5==X:
            print(A,B)
            sys.exit()
        A+=1
    A=-200
    B+=1

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

for b in range(-10**3,10**3):
  z = X + b**5 
  for a in range(-10**3,10**3):
    if a**5 == z:
      print(a,b)
      exit()

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 9)

def int1(x): return int(x) - 1
def II(): return int(input())
def MI(): return map(int, input().split())
def MI1(): return map(int1, input().split())
def LI(): return list(map(int, input().split()))
def LI1(): return list(map(int1, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def MS(): return input().split()
def LS(): return list(input())
def LLS(rows_number): return [LS() for _ in range(rows_number)]
def printlist(lst, k=' '): print(k.join(list(map(str, lst))))
INF = float('inf')







def solve():
    X = II()
    for a in range(-1000, 1000):
        a5 = pow(a, 5)
        for b in range(-1000, 1000):
            b5 = pow(b, 5)
            if a5 - b5 == X:
                print(a, b)
                return

if __name__ == '__main__':
    solve()

Solution (Python):
import sys

n = int(input())

for i in range(-200,200):
    for j in range(-200,200):
        if i ** 5 - j ** 5 == n:
            print(i,j)
            sys.exit()

Solution (Python):



x=int(input())

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

Solution (Python):
import sys
X = int(input())
for a in range(-118, 120):
    for b in range(-119, 119):
        if a**5-b**5==X:
            print(a, b)
            sys.exit(0)

Solution (Python):
import sys

input = sys.stdin.readline


def main():
    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()


if __name__ == "__main__":
    main()

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

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

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

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

flag = False
for i in range(-120, 120):
    for j in range(-120, 120):
        if i ** 5 - j ** 5 == X:
            print(i, j)
            flag = True
            break
    if flag:
        break

Solution (Python):
from collections import defaultdict as dd
from collections import deque
import bisect
import heapq

def ri():
    return int(input())

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


def solve():
    x = ri()
    fifths = {i**5: i for i in range(10000)}

    a = 0
    while 1:
        if x - a**5 in fifths:
            print (a, -fifths[x - a**5])
            return
        elif a**5 - x in fifths:
            print (a, fifths[a**5 - x])
            return
        a += 1






mode = 's'

if mode == 'T':
    t = ri()
    for i in range(t):
        solve()
else:
    solve()

Solution (Python):
x = int(input())
for a in range(1000000):
    b = round(abs(a ** 5 - x) ** (1 / 5))
    if x in [a ** 5 + b ** 5, a ** 5 - b ** 5]:
        if a ** 5 < x: b *= -1
        print(a, b)
        break

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

going = False

for A in range(-120, 121):
    for B in range(-120, 121):
        if A ** 5 - B ** 5 == X:
            print(A, B)
            going = True
            break
    if going:
        break

Solution (Python):
import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


x = I()










a = list(range(-118, 121))
b = list(range(-119, 120))
ans = [-118, -119]
for i in a:
    for j in b:
        if i ** 5 - j ** 5 == x:
            ans = [i, j]
            break
print(*ans)

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

q = 0

for b in range(-120,120):
    for a in range(b+1,120):
        if a**5 - b**5 == x:
            print(a,b)
            q = 1
            break
    if q == 1:
        break

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

for i in range(-200, 200):
  for j in range(-200, 200):
    if i ** 5 - j ** 5 == x:
      print(i, j)
      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):
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)
                return

if __name__ == "__main__":
    main()

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

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

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

for A in range(-119, 121, 1):
    for B in range(-119, 121, 1):
        if A**5 - B**5 == X:
            print("{} {}".format(A, B))
            sys.exit()

Solution (Python):
X = int(input())
for i in range(-201, 201):
    done = False
    for j in range(-201, 201):
        if i ** 5 - j ** 5 == X:
            print(i, j)
            done = True
            break
    if done:
        break

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

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

ans=[]
for i in range(-501,501):
    for j in range(-500,501):
        sum = i**5 - j**5
        if sum == X:
            ans.append(i)
            ans.append(j)
            print(*ans)
            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):
x=int(input())
for i in range(-200,200):
    for j in range(-200,200):
        if i**5-j**5==x:
            print(i,j)
            exit()

Solution (Python):
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 == a-L[j]:
            print(i, j)
            sys.exit()
        elif X == a+L[j]:
            ans = j*-1
            print(i, ans)
            sys.exit()

Solution (Python):
def ABC166D(x):
    for a in range(-118, 120):
        for b in range(-119, 119):
            if a**5 - b**5 == x:
                print(a, b)
                return

x = int(input())
ABC166D(x)

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())
i=1
flag=0
for i in range(200):
    for j in range(-200,200):
        if(i**5+j**5==x):
            flag=1
            print(i,-j)
            exit(0)

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

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

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

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

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

Solution (Python):
x = int(input())
a = [0]*1000
for i in range(1000):
    tmp = i**5
    a[i] = tmp
for i in range(1000):
    for j in range(1000):
        if((a[i]-x) == (a[j])):
            print(i,j)
            exit()
        elif(x-a[i]==a[j]):
            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()

Solution (Python):
X=int(input())
a=[]
for i in range(-100,200):
  for j in range(-100,200):
    if i**5-j**5==X:
      a.append(str(i))
      a.append(str(j))
      break
  else:
    continue
  break  
print(' '.join(a[0:2]))

Solution (Python):
X=int(input())
a=[]
for i in range(-100,200):
  for j in range(-100,200):
    if i**5-j**5==X:
      a.append(str(i))
      a.append(str(j))
      break
print(' '.join(a[0:2]))

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

found = False
for a in range(-200, 200):
    if found: break;
    for b in range(-200, 200):
        if a ** 5 - b ** 5 == X:
            print(a, b)
            found = True
            break