import Data.List
import Control.Monad

input_int :: IO Int
input_int = do
    a <- getLine
    return (read a)

test :: Int -> (Int, Int)
test x = 
    let ns = [(n^5, n) | n <- [0..1000]]
        adds = [(an, bn) | (a, an) <- ns, (b, bn) <- ns, a > b, a - b == x]
        subs = [(an, (-bn)) | (a, an) <- ns, (b, bn) <- ns, a + b == x]
    in  head (adds ++ subs)
    
    
main = do
    x <- input_int
    let (a, b) = test x
    putStrLn ((show a) ++ " " ++ (show b))
        
