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

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