peterverebics/CodeNet_Python_118 huggingface dataset:
A, B, K = map(int, input().split())

if K <= A:
    print("{} {}".format(A - K, B))
else:
    K -= A
    print("{} {}".format(0, max(B - K, 0)))
A,B,K=map(int,input().split())
if A>K:
  A-=K
elif A+B>=K:
  B-=(K-A)
  A=0
  
else:
  A=0
  B=0
print(A,B)
t,a,k = map(int,input().split())
 
t = t-k
if t<0:
  a += t
  t = 0
if a<0:
  a = 0
print(t,a)
a, b, k = map(int, input().split())

if a >= k:
  a = a-k
  print(a,b)
elif a < k <= a+b:
  x = k - a
  b -= x
  a = 0
  print(a,b)
elif k > a+b:
  a = 0
  b = 0
  print(a,b)
a,b,c=map(int,input().split())
if a>c:
    print(a-c,b)
elif a<=c and b<=(c-a):
    print(0,0)
else:
    print(0,b-(c-a))
a, b, k = map(int, input().split())
if a >= k:
    a = a - k
elif a + b >= k:
    b = b - (k - a)
    a = 0

else:
    a = 0
    b = 0
print(a,b)
a, b, k = map(int, input().split())

if a + b <= k:
    a, b = 0, 0
elif a <= k:
    b = b - (k-a)
    a = 0
else:
    a = a-k

print(a, b)
# solution
import io

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

if a <= k:
  k -= a
  a = 0
  if b <= k:
    b = 0
  else:
    b -= k
else:
  a -= k

print("{} {}".format(a,b))
a,b,k=map(int,input().split())
if a+b<=k:
    print('0 0')
elif a<=k<a+b:
    print('0 {}'.format(a+b-k))
else:
    print('{} {}'.format(a-k,b))
a,b,k = map(int,input().split())

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

if A >= K:
    print(A - K, B)
elif A + B >= K:
    print(0, A + B - K)
else:
    print(0, 0)
import sys
input = sys.stdin.readline

INF = float('inf')


def main():
    A, B, K = map(int, input().split())

    if A <= K:
        print(0, max(0, B - K + A))
    else:
        print(A - K, B)


if __name__ == '__main__':
    main()
a,b,k = list(map(int, input().split()))

temp_a = a
if (k >= a):
  a = 0
else :
  a = (a - k)
k = k - temp_a

if k < 0 :
  k = 0
if (k >= b):
  b = 0
else :
  b = (b - k)


print("%s %s" % (a,b))
A, B, K = map(int, input().split())
if A < K:
    K = K - A
    A = 0
elif A == K:
    A = 0
    K = 0
else:  # K < A
    A = A - K
    K = 0

if B < K:
    K = K - B
    B = 0
elif B == K:
    B = 0
    K = 0
else:  # K < B
    B = B - K
    K = 0

print(A, B)
def main():
    A,B,K = map(int, input().split())
    if A>=K:
        print(*[A-K,B])
    elif A+B>=K:
        print(*[0,B-(K-A)])
    else:
        print(*[0,0])

main()
A,B,K=map(int,input().split())

if K >= A + B:
    print(0, 0)
elif K >= A:
    print(0, B-(K-A))
else:
    print(A-K, B)
a,b,k = map(int,input().split())
t = max(a-k,0)
 
if t == a-k:
  print(t,b)
  exit()
else:
  b -= abs(a-k)
  if b <= 0:
    print(0,0)
    exit()
    
print(0,b)
import sys

input = lambda: sys.stdin.readline().rstrip()


def solve():
    A, B, K = map(int, input().split())

    if A < K:
        B = max(0, B - (K - A))
        A = 0
    else:
        A = A - K

    print(A, B)


if __name__ == '__main__':
    solve()
A, B, K = map(int,input().split())
a = 0
b = 0

if K <= A:
  a = A - K
  b = B
elif A < K <= A + B:
  b = B + A - K

print(str(a) + ' ' + str(b))
a,b,k = list(map(int,input().split()))
x = max(0,a-k)
y = max(0,b-max(0,k-a))
print(x,y)
A, B, K = map(int, input().split())

if A-K >= 0:
    print(A-K, B)
elif A-K < 0:
    if B-(K-A)>=0:
        print(0, B-(K-A))
    else:
        print(0, 0)
A,B,K = map(int,input().split())
if A>=K:
    print(*(A-K,B))
elif A+B-K>=0:
    print(*(0,A+B-K))
else:
    print(*(0,0))
A,B,K = map(int,input().split())
if A >= K:
  ans = [A-K,B]
elif A+B >= K:
  ans = [0,A+B-K]
else:
  ans = [0,0]
print(*ans)
a, b, k = map(int, input().split())

aa = max (a - k, 0)
rest = max(k - a, 0)
bb = max (b - rest, 0)
print(f'{aa} {bb}')
a, b, k = map(int, input().split())
x = max(a-k, 0)
y = max(min(b, (a+b-k)), 0)
print(x, y)
s,t,n = map(int,input().split())

if s + t <=  n:
  print('0 0')
elif s >= n:
  print(str(s-n) + ' ' + str(t))
else:
  print('0 ' + str(s+t-n))
A,B,K = map(int,input().split())
if(K <= A):
    A = A-K
elif(K < A+B):
    B = A+B-K
    A = 0
else:
    A = 0
    B = 0
print(A, B)
a, b, k = map(int, input().split())

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

if a >= k:
    a -= k
    print(a, b)
    exit()
else:
    c = 0
    k -= a
    if k <= b:
        b -= k
        print(c, b)
    else:
        print(0, 0)
a,b,k=map(int,input().split())
s=a-k
if s>=0:print(str(s)+" "+str(b))
else:
    u=b+s
    if u>=0:print("0 "+str(u))
    else:print("0 0")
A, B, K = map(int,input().split())

if A+B <= K:
    print(0,0)
elif A <= K:
    print(0,A+B-K)
else:
    print(A-K,B)
a, b, k = map(int, input().split())

if a >= k:
  print(a - k, b)
elif a + b >= k:
  print(0, a + b - k)
else:
  print(0, 0)
a, b, k = map(int, input().split())
aout = max(0, a - k)
bout = max(0, b - max(0, k - a))
print(aout, bout)
A,B,K=map(int,input().split())
if A>=K:
    A=A-K
elif A+B>=K:
    B=B+A-K
    A=0
else:
    A=0
    B=0
print(A,B)
A,B,K = map(int, input().split())

if A > K:
    print("{} {}".format(A-K,B))
elif A+B<=K:
    print("{} {}".format(0,0))
else:
    print("{} {}".format(0,B+A-K))
A,B,K=map(int,input().split())
if A>K:
  print(str(A-K)+" "+str(B))
elif A+B>K:
  print(str(0)+" "+str(A+B-K))
else:
  print("0 0")
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
a, b, k = M()
if k >= a:
    k -= a
    a = 0
else:
    a -= k
    k = 0
if k >= b:
    b = 0
else:
    b -= k
print(a, b)
A, B, K = map(int, input().split())
print(A - K, B) if A > K else print(0, A + B -K) if A + B > K else print(0, 0)
a,b,k = map(int, input().split())
if a <= k:
    k -= a
    if b <= k:
        k -= b
        print(0,0)
    else:
        print(0,b-k)
else:
    print(a-k,b)
A,B,K=map(int,input().split())

if A >= K:
    A -= K
elif A+B >=K:
    K -= A
    A = 0
    B -= K
else:
    A = 0
    B = 0

print(str(A) + ' ' + str(B))
# -*- coding:utf-8 -*-
a,b,k=map(int,input().split())
if a<=k:
    k=k-a
    a=0
    b=max(0,b-k)
else:
    a=a-k
print(str(a)+' '+str(b))
a, b, k = map(int, input().split())
print(max(0, a - k), min(b, max(0, a + b - k)))
a,b,n=map(int,input().split())
if a-n > 0:
  print(a-n, b)
elif b-(n-a) > 0:
  print(0,b-(n-a))
else:
  print(0,0)
A, B, K = map(int, input().split())
takahasi = max(A - K, 0)
aoki = max(B - (K - (A - takahasi)), 0)
print(takahasi, aoki)
A, B, K = map(int, input().split())
quant = A + B

if quant - K <= 0:
    print('0 0')
else:
    rnt = A - K  # RemainNumTime
    a = max(rnt, 0)
    b = min(B + rnt, B)
    print(str(a) + ' ' + str(b))
a, b, k  = map(int, input().split())
if a >= k:
    a = a - k
elif a < k <= a + b:
    b = b - k + a
    a = 0
else:
    a = 0
    b = 0
print(a,b)
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60


def main():
    A, B, K = map(int, readline().split())
    if K <= A:
        print(A - K, B)
    elif A < K <= A + B:
        print(0, A + B - K)
    else:
        print(0, 0)

    return


if __name__ == '__main__':
    main()
a, b, k = [int(x) for x in input().split()]

d = min(a, k)
a -= d
k -= d
b = max(0, b - k)
print(a, b)
A,B,K=map(int,input().split())
if A>=K:
  print(A-K,B)
elif A+B<K:
  print(0,0)
else:
  print(0,B-(K-A))
A, B, K = map(int, input().split())
ansA = max(0, A - K)
ansB = max(0, B - max(0, K - A))
print(ansA, ansB)
import sys
input = sys.stdin.readline

def main():
    a, b, k = map(int, input().split())
    t = a - k
    if t >= 0:
        print(t,b)
    else:
        print(0, max(0,b+t))

if __name__ == "__main__":
    main()
A, B, K = map(int, input().split())

if K >= A+B:
    print("0 0")
elif K <= A:
    print("{} {}".format(A-K, B))
elif K > A:
    print("0 {}".format(B-(K-A)))
def main():
    a, b, k = map(int,input().split()) 

    if a > k:
        print(a-k, b)
    elif a + b > k:
        print(0, b-(k-a))
    else:
        print(0, 0)

    




    
if __name__ == "__main__":
    main()
A, B, K = map(int, input().split())
A -= K
if A < 0:
    B += A
    A = 0
print(max(0, A), max(0, B))
a, b, k = map(int, input().split())

if k <= a:
    print(a - k, b)
elif a < k and k <= (a + b):
    print(0, a + b - k)
else:
    print(0, 0)
A,B,K = map(int,input().split())

if K<=A:
    A -= K
elif A<K<=A+B:
    B -= (K-A)
    A = 0
elif A+B < K:
    A = B = 0

print(A,B)
a,b,k = map(int, input().split())

res_a = max(0, a-k)
res_b = max(0, b-(k-a)) if k-a>0 else b

print(res_a, res_b)
a, b, k = map(int,input().split())
if(a>=k):
  print(a-k,b)
elif(b-k+a>=0):
  print(0,b-k+a)
else:
  print(0,0)
def main():
    a, b, k = map(int, input().split())

    a, k = max(0, a-k), max(0, k-a)
    b = max(0, b-k)

    print('{} {}'.format(a, b))


if __name__ == '__main__':
    main()
A, B, K = map(int, input().split())
print(max(0, A-K), max(A+B-K-max(0, A-K), 0))
A,B,K = map(int,input().split())
 
if K >= A:
  B = B -(K-A)
  A = 0
  if B < 0:
    B = 0
else:
  A = A - K

print(str(A) + " " + str(B))
def InS(): return input()


def InL(): return list(map(int, input().split()))


def InI(): return int(input())


A, B, K = InL()

if A >= K:
    print(A - K, B)
elif A + B >= K:
    print(0, B - (K-A))
else:
    print(0, 0)
a,b,k = map(int,input().split())

if a >= k:
    print(a-k,b)
elif a +b >= k:
    print(0,b-(k-a))
else:
    print(0,0)

#print(max(0,a-k),max(0,b-abs(a-k)))
A, B, K = map(int, input().split())

X = min(A, K)
A -= X
K -= X

if K == 0:
    print(A, B)
else:
    X = min(B, K)
    B -= X
    K -= X
    print(A, B)
import sys
A, B, K = map(int, input().split())

if A >= K:
    A -= K
    print(A, B)
    sys.exit(0)
else:
    K -= A
    if B >= K:
        B -= K
        print(0, B)
        sys.exit(0)
    else:
        print(0, 0)
A, B, K = map(int, input().split())

a = A - K
k = K - A
if k <= 0:
    k = 0
b = B - k

if a <= 0:
    a = 0
if b <= 0:
    b = 0

print(a, b)
A, B, K = map(int, input().split())

A -= K
if A < 0:
    K = abs(A)
    A = 0
else:
    K = 0

B -= K
if B < 0:
    B = 0

print(A, B)
A,B,K=map(int,input().split())

if A>=K:
    print(A-K,B)
else:
    print(0,max(0,B-(K-A)))
a, b, k = input().split(' ')
a = int(a)
b = int(b)
k = int(k)

if a == 0 and b == 0:
    print(str(a) + ' ' + str(b))
elif a >= k:
    out = str(a - k) + ' ' + str(b)
    print(out)
else:
    a2 = k - a
    if b - a2 > 0:        
        out = '0 ' + str(b - a2)
        print(out)
    else:
        print('0 0')
import re
def main():
    A,B,K=map(int, input().split()) 
    if K>=A:
        print('0 '+str(max(0,B-K+A)))
    else:
        print(str(A-K)+' '+str(B))


if __name__ == '__main__':
    main()
A, B, K = map(int, input().split())
print(A-K, B) if A>=K else print(0, B-(K-A)) if K<=A+B else print(0, 0)
def resolve():
    A, B, K = list(map(int, input().split()))
    taka = max(A-K, 0)
    ao = max(B-(K-A), 0) if K > A else B
    print(taka, ao)

if '__main__' == __name__:
    resolve()
a, b, k = map(int, input().split())
if a + b < k:
    print("0 0")
elif a < k:
    print("0 {}".format(b - (k - a)))
else:
    print("{} {}".format(a - k, b))
import sys

read = sys.stdin.read
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7


def main():
    A, B, K = map(int, readline().split())
    if A>=K:
        A -= K
    else:
        B = max(B-(K-A),0)
        A = 0
    print(A, B)



if __name__ == '__main__':
    main()
A,B,K = map(int, input().split())
print(max(0,A-K),max(0,B-max(0,K-A)))
a, b, k = map(int, input().split())
if a < k:
    print(max(a - k, 0), max(b - k + a, 0))
else:
    print(a-k, b)
#!/usr/bin/env python3
import sys
input = sys.stdin.readline

a, b, k = [int(item) for item in input().split()]
if a >= k:
    print(a - k, b)
else:
    print(0, max(0, b - (k - a)))
a, b, k = map(int, input().split())

if a >= k:
  print(a - k, b)
elif a < k and b > k - a:
  print(0, (b - k + a))
else:
  print(0,0)
i = input().split()
a = int(i[0])
b = int(i[1])
k = int(i[2])
c = a 
d = b

if k >= a+b:
  c = d = 0

elif k == a:
  c = 0

elif k > a:
  c = 0
  d = b - (k - a)

else:
  c = a - k
  
print(c,d)
a,b,k=[int(x) for x in input().split()]

if a>=k:
  print(a-k,b)
elif a+b>=k:
  print(0,a+b-k)
else:
  print(0,0)
A, B, K = map(int, input().split())


if A + B <= K:
    print(0, 0)

elif A <= K:
    C = K - A
    print(0, B-C)

else:
    print(A - K, B)
a, b, k = map(int, input().split())
if a <= k:
    k -= a
    a = 0
    if b <= k:
        k -= b
        b = 0
    else:
        b -= k
        k = 0       
else:
    a -= k
    k = 0
    
print('{0} {1}'.format(a, b))
a, b, k = map(int, input().split())
 
if a >= k:
    print(a - k, b)
else:
    print(0, max(0, b - k + a))
a,b,k = map(int,input().split())
print(max(a-k,0),max(0,b+min(a-k,0)))
A, B, K = list(map(int, input().split()))

if (A > K):
    print(A - K, B)
elif (A + B > K):
    print(0, A + B - K)
else:
    print(0, 0)
# coding: utf-8
a,b,k = map(int, input().split())
if a <= k:
    k -= a
    a = 0
    b = max(0, b-k)
else:
    a -= k
print(a, b)
A,B,K = map(int,input().split())
if A >= K:
    print(A-K,B)
elif K <= A + B:
    print(0,B+A-K)
else:
    print(0,0)
a, b, k = map(int, input().split())
ac, k = min(a, k), k - min(a, k)
bc = min(b, k)
print(a-ac, b-bc)
a,b,k=(map(int, input().split()))
if a>k:
  print(a-k,b)
else:
  if a+b>k:
    print(0,a+b-k)
  else:
    print(0,0)
a,b,k=map(int,input().split())
if k>=a+b:
    print(0,0)
elif k>=a:
    print(0,a+b-k)
else:
    print(a-k,b)
import sys

A, B, K = [int(v) for v in sys.stdin.readline().split()]

if K <= A:
    print(A - K, B)
    sys.exit(0)

if K <= A + B:
    print(0, (A + B) - K)
    sys.exit(0)

print(0, 0)
A,B,K = map(int,input().split(" "))
if A+B < K:print(0,0)
elif A > K:print(A-K,B)
elif A  <= K:print(0,A+B-K)
# Kenparさん、写経させていただきました。ありがとうございます。
# こんな解法があったなんて・・・
a, b, k = map(int, input().split(' '))

if a > 0 and k >= a:
	k -= a
	a = 0
elif a > 0:
	a -= k
	k = 0

if b > 0 and k >= b:
	k -= b
	b = 0
elif b > 0:
	b -= k
	k = 0

print(a, b)
A,B,K=map(int,input().split())
if K-A>=0:
    K=K-A
    A=0
    if K-B>=0:
       B=0 
    else:
        B=B-K
else:
    A=A-K
print(A,B)
a, b, k = map(int, input().split())
print(max(a-k, 0), max(b-(max(k-a,0)), 0))
a,b,k = map(int,input().split())
if k <= a:
  print(a-k,b)
elif a < k <= a+b:
  print(0,b-k+a)
else:
  print(0,0)
def solve():
  a,b,k = (int(i) for i in input().split())
  caneat = min(k,a+b)
  ans = [0,b]
  if a <= caneat:
    ans[0] = 0
    ans[1] = b-(caneat-a)
  else:
    ans[0] = a-caneat
  print(*ans)
solve()
a,b,k=map(int,input().split())
a,b = max(0,a-k) , max(b-max(k-a,0),0)
print(a,b)
A, B, K = map(int, input().split())
a = A
b = B

if A >= K:
    a -= K
elif A < K and B >= K - A:
    a = 0
    b -= K - A
else:
    a = 0
    b = 0
print(str(a) + " " + str(b))
a,b,k=map(int,input().split())
if a>=k:
  print(a-k,b)
elif a+b>=k:
  print(0,a+b-k)
else:
  print(0,0)
a, b, k = map(int, input().split())

if a >= k:
    a -= k

elif a < k:
    k -= a
    a = 0
    if b >= k:
        b -= k
    else:
        b = 0

print(a, b)
A,B,K = map(int,input().split())
T = A - K
O = B

if T >= 0:
    print(T, O)
elif O+T >=0:
    print(0,O+T)
else:
    print(0,0)
a, b, x = map(int, input().split())
if a + b < x:
    a = 0
    b = 0
    print(a, b)
elif a < x:
    b = b - x + a
    a = 0
    print(a, b)
else:
    a = a - x
    print(a, b)
A,B,K = map(int,input().split())
if K < A:
  print(A - K, B)
elif A <= K and K < (A + B):
  print(0, B - (K - A))
else:
  print(0,0)
# B - Greedy Takahashi

A, B, K = map(int, input().split())

if A <= K:
    B = B - min(B, K - A)
    A = 0
else:
    A = A - K

print(A, B)
A,B,K = map(int,input().split())

if A+B <= K:
    print(0,0)
elif A <= K:
    print(0,B-(K-A))
else:
    print(A-K,B)
A, B, K = (int(x) for x in input().split())
if K >= A+B:
  A = 0
  B = 0
elif K >= A:
  B = B + A - K
  A = 0
elif K < A:
  A = A - K
print(A,B)
a, b, k = map(int, input().split())
print(max(0, a-k), max(0, b - max(0, k-a)))
a,b,k = map(int,input().split())

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

if a + b < k:
    print( "0 0" )
elif a < k:
    print( "0 " + str( a + b - k ) )
else:
    print( str( a - k ) + " " + str( b ) )
a, b, k = map(int, input().split())
after_a = max(0, a - k)
after_b = b
if after_a == 0:
    k -= a
    after_b = max(0, b - k)

print(after_a, after_b)
a,b,k=map(int, input().split())
s = a-k if k<a else 0 
print('%d %d'%(s, (a+b)-k))
A, B, K = map(int, input().split())

# for i in range(K):
#     if A > 0:
#         A -= 1
#     elif B > 0:
#         B -= 1

if A >= K:
    A -= K
elif A+B >= K:
    A = 0
    B -= K-A

if B < 0:
    B = 0

print(A, B)
def main():
    a, b, k = list(map(int, input().split()))

    a = a - k
    if a < 0:
        k = a * -1
        a = 0
    else:
        k = k - a

    b = b - k if b > 0 else 0

    print(a, b)

if __name__ == '__main__':
    main()
a, b, k = map(int, input().split())
if k < a:
    print(str(k - a) + " " + str(b))
elif a <= k and k < a + b:
    print(str(0) + " " + str(b - k + a))
else:
    print(str(0) + " " + str(0))
A, B, K = map(int, input().split())

A_after = 0
B_after = 0

if A - K >= 0:
  A_after = A - K

elif A + B - K >= 0:
  B_after = B - (K - A)
  
print(A_after, B_after)
from collections import deque

A, B, T = map(int,input().split())

t = A - T
if t >= 0:
    print(t, B)
else:
    print(0, B+t)
a,b,k=map(int,input().split())
a,b = max(0,a-k) , b-max(k-a,0)
print(a,b)
A, B, K = map(int, input().split())

if A >= K:
  print(str(A - K) + " " + str(B))
else:
  print("0 " + str(B + A - K))
a,b,k=map(int,input().split())
print(a-k,b) if a>=k else print(0-b-k+a) if k<=a+b else print(0,0)
a,b,k=map(int,input().split())
if a+b<=k:
    print(0,0)
elif a==0 and b>=k:
    print(0,b-k)
elif a>=k and b==0:
    print(a-k,b)
else:
    print(0,0)
import sys

A, B, K = map(int ,input().split())

if A >= 1000000000000 or B >= 1000000000000 or K >= 1000000000000:
    print("0 0")
    sys.exit()
else:
    for i in range(0, K):
        if A >= 1:
            A -= 1
            if A == 0:
                if B >= 1:
                    B -= 1
    
print("{} {}".format(A, B))
t_cookie, a_cookie, K = [int(i) for i in input().split(" ")]
 
t_cookie = t_cookie - K if t_cookie >= K else 0
a_cookie = a_cookie if t_cookie >= K else a_cookie - ( K - t_cookie )
 
print(t_cookie,a_cookie)
A, B, K = map(int, input().split())

if K<=A:
  print(A-K, B)
elif A<K<=B:
  print(0, B-(K-A))
else:
  print(0,0)
"""
for k in range(K):
  if A>0 and B!=0:
    A+=-1
  elif A==0 and B>0:
    B+=-1
  elif A==0 & B==0:
    break
print(A, B)
"""
A,B,K=map(int,input().split())
if A>=K:
    A-=K
else:
    B=A+B-K
    A=0
print(A,B)
a,b,k=map(int,input().split())
if a>k:
    print(a-k,b)
elif a+b>k:
    print(0,a-(k-a))
else:
    print(0,0)
a, b, k = map(int, input().split())
if k <= a:
  print(a-k,b)
else:
  b=b-(k-a)
  print(0,b)
a, b, k = map(int, input().split())
print(max(0, a-k), b+min(0, a-k))
c=list(map(int, input().split()))

if c[0]>=c[2]:
  c[0]-=c[2]
else :
  c[2]-=c[0]
  c[1]-=c[2]
  c[0]=0
print(c[0] , c[1])
a,b,k = map(int, input().split())
if a <= k:
    print(0,b-(k-a))
else:
    print(a-k,b)
a, b, k = map(int, input().split())
if a >= k:
    a -= k
else:
    b = max(0,k - a)
    a = 0
print(a, b)
from itertools import accumulate, permutations, combinations, product, combinations_with_replacement
from math import floor, ceil, sqrt, factorial, log
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict
from heapq import heappop, heappush, heappushpop
from itertools import product
import sys
stdin = sys.stdin
mod = 10**9 + 7


def ns(): return stdin.readline().rstrip()


def ni(): return int(ns())


def na(): return list(map(int, stdin.readline().split()))


a, b, k = na()
takahashi = a - min((k + 1) // 2, b)
aoki = b - min(k // 2, a)
print(takahashi, aoki)
#!/usr/bin/env python3

A, B, K = map(int, input().split())

if A >= K:
    print(A - K, B)
else:
    print(0, A + B - K)
a,b,k=map(int,input().split())
if k<=a:
    print(a-k, b)
elif a<k<b:
    print("0", b-(k-a))
else:
    print("0", "0")
a, b, k = map(int, input().split())

if a > k:
  print(str(a-k) + ' ' + str(b))
elif a <= k:
  print(str(0) +  ' ' + str(a + b -k))
a,b,k = map(int,input().split())
if k<=a:
  a -= k
else:
  b -= (k-a)
  a = 0
print(a,b)
a,b,k = map(int,input().split())
if a >= k:
    print(str(a - k) + " " + str(b))
else:
    print("0" + " " + str(b - k + a))
A, B, K = map(int, input().split())
if K <= A:
  print(K-A, B)
else:
  if K <= A + B:
    print(0, B-K-A)
  else:
    print(0, 0)
input_from = input()
info = input_from.split(' ')
a = int(info[0])
b = int(info[1])
k = int(info[2])
a -= k
if a < 0:
    b += a
    a = 0
print("{0} {1}".format(a, b))
from itertools import accumulate, permutations, combinations, product, combinations_with_replacement
from math import floor, ceil, sqrt, factorial, log
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict
from heapq import heappop, heappush, heappushpop
from itertools import product
import sys
stdin = sys.stdin
mod = 10**9 + 7


def ns(): return stdin.readline().rstrip()


def ni(): return int(ns())


def na(): return list(map(int, stdin.readline().split()))


a, b, k = na()
takahashi = a - min((k + 1) // 2, a)
aoki = b - min(k // 2, b)
print(takahashi, aoki)
a,b,k=map(int, input().split())
print( max(0,a-k), min([0,b,a+b-k]) )
a,b,k = map(int, input().split())

if a >= k:
    print(a-k, b)
elif a < k:
    print(0, b-(k-a))
elif b-(k-a) < 0:
    print(0, 0)
A, B, K = map(int, input().split())
A_ = min(A, K)
print(A_, min(0, B-(K-A_)))
A, B, K = map(int,input().split())
a = 0
b = 0

if K <= A:
  a = A - K
elif A < K <= A + B:
  a = 0
  b = B + A - K

print(str(a) + ' ' + str(b))
A,B,K = [int(i) for i in input().split()]

if K >= A:
    A = 0
    K = K-A
else:
    A = A-K
if K >= B:
    B = 0
else:
    B = B-K
    
print(A,B)
A, B, K = [int(x) for x in input().split(" ")]

if A >= K:
  print("{} {}".format(A-K, B))
elif A < K and A+B >= K:
  print("{} {}".format(0, int(A-K/2+B-K/2)))
else:
  print(0)
A, B, K = map(int, input().split())

x = K - A
if 0 <= x:
    A = 0
    B = B - x
else:
    A = A + x

print(A, B)
a,b,k = list(map(int,input().split(" ")))

if a > k:
    a -= k
    print(str(a) + " " + str(b))
else:
    left = k - a
    b -= left
    print(str(0) + " " + str(b))
A, B, K= list(map(int, input().split()))

if A>= K:
  print(A-K, end=" ")
  print(B)
else:
  print(0, end=" ")
  print(B-(K-A))
A, B, K = map(int, input().split())
if A >= K:
    print(A-K, B)
else:
    print(0, B-(K-A))
a, b, k = map(int, input().split())
if (a, b) == (0, 0):
    print(0, 0)
    exit(0)
if a - k < 0:
    print(0, b - (k-a))
else:
    print(a-k, b)
A,B,K=map(int,input().split())
if A>=K:
    A=A-K
else:
    B=B-(K-A)
    A=0
print(A,B)
a,b,k = map(int,input().split())
if a >= k:
  print(a-k,b)
else:
  print(0,b-(k-a))
a, b, k = map(int, input().split())
if k - a > 0:
    k -= a
    if b - k >= 0:
        print(0, b - k)
    else:
        print("0 0")
else:
    print(k - a, b)
import sys
import socket

hostname = socket.gethostname()

if hostname == 'F451C':
    sys.stdin = open('b1.in')


def read_int_list():
    return list(map(int, input().split()))


def read_str_list():
    return input().split()


def read_int():
    return int(input())


def read_str():
    return input()


def main():
    A, B, K = read_int_list()
    a = A - K
    if a < 0:
      a = 0
    
    b = B - abs(A - K)
    if A > K:
      b = B

    if A == 0 and B == 0:
      a = b = 0
    print(a, b)


main()
A, B, K = [int(i) for i in input().split()]

a = max(A - K, 0)
k = max(K - A, 0)
b = B - k
print("{} {}".format(a, b))
A, B, K = map(int, input().split())
if A>=K:
    A = A - K
    print(A,B)
else:
    A = 0
    B = max(0,B-(K-A))
    print(A,B)