N,A,B=list(map(int,input().split()))

if A+B-N>0:

    print((min(A,B),A+B-N))

else:

    print((min(A,B),"0"))
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()))
if A + B - N > 0:
    print((min(A, B), A + B - N))
else:
    print((min(A, B), "0"))

N, A, B = list(map(int, input().split()))
print((min(A, B), max(0, A + B - N)))

-if A + B - N > 0: -    print((min(A, B), A + B - N)) -else: -    print((min(A, B), "0")) +print((min(A, B), max(0, A + B - N)))