import Data.List
g n
  | n > 0 = n
  | otherwise = 0
f (n:a:b:[])
  | a > b = putStrLn ((show b) ++ " " ++ (show (g (a + b - n))))
  | otherwise = putStrLn ((show a) ++ " " ++ (show (g (a + b - n))))
main = do
  xs <- map read . words <$> getLine
  f xs
