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 (a,b) = head [(a,b)| a <- [0..200], b <- [-200..200], a^5 - b^5 == x]
    putStr $ show a
    putStr " "
    putStrLn $ show b