main = do
    x <- readInt <$> getLine
    let max = max' 0 x
        candidates = concat [[n, - n] | n <- [0..max]]
        answer = head [(a, b) | a <- candidates, b <- candidates, a ^ 5 - b ^ 5 == x]
    putStr $ show (fst answer) ++ " " ++ show (snd answer)

readInt :: String -> Integer
readInt = read

max' n m 
    | n ^ 5 + (n - 1) ^ 5 < m = max' (n + 1) m
    | otherwise     = n