let Nstr: String? = readLine()
let N: Int = Int(Nstr!)!
let Astr: String? = readLine()
let A: Int = Int(Nstr!)!
let Bstr: String? = readLine()
let B: Int = Int(Nstr!)!

let mini = A < B ? A : B
print(mini, A + B - N < 0 ? 0 : A + B - N)
