class Problem
  attr_accessor *(?a..?z).to_a.map(&:to_sym)
  def initialize
    @n,@a,@b = gets.split.map(&:to_i)
  end

  def solve
    [maxi, mini].join(" ")
  end

  def maxi
    [a,b].min
  end

  def mini
    [a + b - n, 0].max
  end

  def show(ans)
    puts ans
  end
end

Problem.new.instance_eval do
  show(solve)
end