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

num = min(a,k)

a -= num

k -= num

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



if a <= k:

  k -= a

  a = 0

else:

  a -= k

  k = 0



b = max(0, b - k)



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

a, b, k = list(map(int, input().split()))
if a <= k:
    k -= a
    a = 0
else:
    a -= k
    k = 0
b = max(0, b - k)
print((a, b))

-num = min(a, k) -a -= num -k -= num -print((a, max(b - k, 0))) +if a <= k: +    k -= a +    a = 0 +else: +    a -= k +    k = 0 +b = max(0, b - k) +print((a, b))