n,a,b=list(map(int,input().split()))

print((min(a,b),max(0,-(n-a-b))))
n,a,b=list(map(int,input().split()));print((min(a,b),max(0,a+b-n)))
n, a, b = list(map(int, input().split()))
print((min(a, b), max(0, -(n - a - b))))

n, a, b = list(map(int, input().split()))
print((min(a, b), max(0, a + b - n)))

-print((min(a, b), max(0, -(n - a - b)))) +print((min(a, b), max(0, a + b - n)))