import Text.Printf

main :: IO ()
main = do
  x <- readLn
  let (a, b) = solve x
  printf "%d %d\n" a b

solve :: Int -> (Int, Int)
solve x = head [ (a, b) | a <- [-118..119], b <- [-119..118], a ^ 5 - b ^ 5 == x ]
