fun main(args: Array<String>) {
    val (n, a, b) = readLine()!!.split(" ").map(String::toInt)
    val maxMinPair = maxMinSub(n, a, b)
    print("${maxMinPair.first} ${maxMinPair.second}")
}

/**
 * Pair max, min
 */
fun maxMinSub(n: Int, a: Int, b: Int) : Pair<Int, Int> {
    return if (n <= (a + b)) { // 10 5 7
        Pair(Math.min(a, b), Math.abs(a+b-n))
    } else {  // 10 3 5
        Pair(Math.min(a, b), 0)
    }
}