import Data.Int
import Data.Maybe

main = do
  line <- getLine 
  let t = read line :: Int64
  display $ listToMaybe [(x, y) | x <- [-500..500], y <- [-500..500], x^5 - y^5 == t]
    where 
      display Nothing = putStrLn "-1"
      display (Just (a, b)) = putStrLn (show a ++ " " ++ show b)