import Control.Monad
import Data.List
import Control.Applicative

main = do
  [n,a,b] <- map read . words <$> getLine
  putStr $ show $ aandb  n a b
  putStr " "
  putStrLn $ show $ axorb  n a b

aandb :: Int -> Int -> Int -> Int
aandb n a b
  |a > b = b
  |otherwise = a

axorb :: Int -> Int -> Int -> Int
axorb n a b
  |a + b - n > 0 = a + b - n
  |otherwise = 0