Buggy python submission (verdict: Time Limit Exceeded):
from math import ceil #切り上げ
import numpy as np
 
def inp(): return int(input()) #一個だけ読み取り
def inpm(): return map(int,input().split()) #mapオブジェクトで呼び出し
def inpl(): return list(map(int, input().split())) #数字リストをintで
def inpls(): return list(input().split()) #リストをstrで
 
def check(a,b,X):
  if a**5-b**5 == X:
    return 1
  else:
    return 0
  
X = inp()
A = 0
need = 0
tmp = 0
while 1:
  B = 1
  if A**5>X:
    need = 1
  else:
    need = -1
  reverse = 0
  if check(A,B,X):
    print(str(A)  + " " + str(B))
    break
  else:
    while 1:
      if B < A and A-X <= B:
        if check(A,B,X):
          print(str(A)  + " " + str(B))
          tmp = 1
          break
      else:
        break
      if reverse == 0 and need == -1:
        B = (-1)*B
        reverse = 1
      elif reverse == 1 and need == 1:
        B = (-1)*B
        B = B + 1
        reverse = 0
      elif reverse == 0 and need == 1:
        B = B + 1
      elif reverse == 1 and need == -1:
        B = B -1
  A += 1
  if tmp:
    break
     

Fixed submission:
from math import ceil #切り上げ
import numpy as np
import sys
 
def inp(): return int(input()) #一個だけ読み取り
def inpm(): return map(int,input().split()) #mapオブジェクトで呼び出し
def inpl(): return list(map(int, input().split())) #数字リストをintで
def inpls(): return list(input().split()) #リストをstrで
 
def check(a,b,X):
  if a**5-b**5 == X:
    return 1
  else:
    return 0
  
X = inp()
for A in range(-118,120):
  for B in range(-119,119):
    if check(A,B,X):
      print(str(A) + " " + str(B))
      sys.exit()

Buggy python submission (verdict: Time Limit Exceeded):
from math import ceil #切り上げ
import numpy as np
 
def inp(): return int(input()) #一個だけ読み取り
def inpm(): return map(int,input().split()) #mapオブジェクトで呼び出し
def inpl(): return list(map(int, input().split())) #数字リストをintで
def inpls(): return list(input().split()) #リストをstrで

def check(a,b,X):
  if a**5-b**5 == X:
    return 1
  else:
    return 0
  
def check2(a,b,X):
  if (a <= b+X) and (a > 0):
    return 1
  else:
    return 0

X = inp()
A = 0
tmp = 0
while 1:
  B = 1
  if A**5>X:
    need = 0
  else:
    need = 1
  reverse = 0
  if check(A,B,X):
    print(str(A)  + " " + str(B))
    break
  else:
    while 1:
      if B < A and A-X <= B:
        if check(A,B,X):
          print(str(A)  + " " + str(B))
          tmp = 1
          break
      else:
        break
      if reverse == 0 and need:
        B = (-1)*B
        reverse = 1
      elif reverse == 1:
        B = (-1)*B
        B = B + 1
        reverse = 0
  A += 1
  if tmp:
    break

Fixed submission:
from math import ceil #切り上げ
import numpy as np
import sys
 
def inp(): return int(input()) #一個だけ読み取り
def inpm(): return map(int,input().split()) #mapオブジェクトで呼び出し
def inpl(): return list(map(int, input().split())) #数字リストをintで
def inpls(): return list(input().split()) #リストをstrで
 
def check(a,b,X):
  if a**5-b**5 == X:
    return 1
  else:
    return 0
  
X = inp()
for A in range(-118,120):
  for B in range(-119,119):
    if check(A,B,X):
      print(str(A) + " " + str(B))
      sys.exit()

Buggy python submission (verdict: Time Limit Exceeded):
from math import ceil #切り上げ
import numpy as np
 
def inp(): return int(input()) #一個だけ読み取り
def inpm(): return map(int,input().split()) #mapオブジェクトで呼び出し
def inpl(): return list(map(int, input().split())) #数字リストをintで
def inpls(): return list(input().split()) #リストをstrで

def check(a,b,X):
  if a**5-b**5 == X:
    return 1
  else:
    return 0
  
def check2(a,b,X):
  if (a <= b+X) and (a > 0):
    return 1
  else:
    return 0

X = inp()
A = 0
tmp = 0
while 1:
  B = 1
  reverse = 0
  if check(A,B,X):
    print(str(A)  + " " + str(B))
    break
  else:
    while 1:
      if B < A and A-X <= B:
        if check(A,B,X):
          print(str(A)  + " " + str(B))
          tmp = 1
          break
      else:
        break
      if reverse == 0:
        B = (-1)*B
        reverse = 1
      elif reverse == 1:
        B = (-1)*B
        B = B + 1
        reverse = 0
  A += 1
  if tmp:
    break

Fixed submission:
from math import ceil #切り上げ
import numpy as np
import sys
 
def inp(): return int(input()) #一個だけ読み取り
def inpm(): return map(int,input().split()) #mapオブジェクトで呼び出し
def inpl(): return list(map(int, input().split())) #数字リストをintで
def inpls(): return list(input().split()) #リストをstrで
 
def check(a,b,X):
  if a**5-b**5 == X:
    return 1
  else:
    return 0
  
X = inp()
for A in range(-118,120):
  for B in range(-119,119):
    if check(A,B,X):
      print(str(A) + " " + str(B))
      sys.exit()

Buggy python submission (verdict: Time Limit Exceeded):
from math import ceil #切り上げ
import numpy as np
 
def inp(): return int(input()) #一個だけ読み取り
def inpm(): return map(int,input().split()) #mapオブジェクトで呼び出し
def inpl(): return list(map(int, input().split())) #数字リストをintで
def inpls(): return list(input().split()) #リストをstrで

def check(a,b,X):
  if a**5-b**5 == X:
    return 1
  else:
    return 0
  
def check2(a,b,X):
  if (a <= b+X) and (a > b):
    return 1
  else:
    return 0

X = inp()
tmp = 0
B = 0
reverse = -1
while 1:
  A = B+X
  if check(A,B,X):
    print(str(A)+ " "+str(B))
    break
  else:
    while check2(A,B,X):
      A = A - 1
      if check(A,B,X):
        print(str(A)+ " "+str(B))
        tmp = 1
        break
        
  if tmp:
    break
  if reverse == -1:
    B = B + 1
    reverse = 0
  elif reverse == 1:
    B = B + 1
    reverse = 0
  else:
    B = (-1)*B
    reverse = 0
    
    

Fixed submission:
from math import ceil #切り上げ
import numpy as np
import sys
 
def inp(): return int(input()) #一個だけ読み取り
def inpm(): return map(int,input().split()) #mapオブジェクトで呼び出し
def inpl(): return list(map(int, input().split())) #数字リストをintで
def inpls(): return list(input().split()) #リストをstrで
 
def check(a,b,X):
  if a**5-b**5 == X:
    return 1
  else:
    return 0
  
X = inp()
for A in range(-118,120):
  for B in range(-119,119):
    if check(A,B,X):
      print(str(A) + " " + str(B))
      sys.exit()