nxy = gets.split.map(&:to_i)
n = nxy[0]
nxy.shift
nxy.sort!
print nxy.min
print " "
if nxy[0] + nxy[1] > n
    if n - (nxy[1] + nxy[0]) < 0
        puts"0"
    else
        puts n - (nxy[1] + nxy[0])
    end
else
    puts "0"
end