toInt :: String -> Int
toInt = read :: String -> Int

main = do
  x <- toInt <$> getLine
  let (a, b) = head [(a, b) | a <- [-120..120], b <- [-120..120], a^5 - b^5 == x]
  putStrLn $ show a ++ " " ++ show b
