import Control.Monad
import Data.Maybe
import qualified Data.ByteString.Char8 as BS
import Data.List

readInt = fst . fromJust . BS.readInt
getInt = readInt <$> BS.getLine

main = do
    x <- getInt
    let ans' = head [(a,b)| a <- [0..100],b <- [0..100], a^5 - b^5 == x || a^5 + b^5 == x]
        ans = if (fst ans')^5 - (snd ans')^5 == x then ans else (fst ans', (-1)*(snd ans'))
    putStr $ show $ fst ans
    putStr " "
    putStrLn $ show $ snd ans