
def amigos(a, b, c)
	return (a == b) && (b == c)
end

def main
	line = gets.chomp.split(/\s/)
	m = line[0].to_i
	x = line[1].to_i
	y = line[2].to_i

	if amigos(m, x, y)
		print "#{x} #{y}\n"
		return
	end

	ab = (x - y).abs
	ma = (x >= y) ? x - ab : y - ab
	mi = x+y <= m ? 0 : x+y-m
	print "#{ma} #{mi}\n"
end

main
