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

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

print(A, B)
A,B,K=map(int,input().split())
 
if A-K>=0:
  print(A-K,B)
elif (A+B)<=K:
  print(0,0)
else:
  print(0,A+B-K)
a,b,k=map(int,input().split())
a-=k
if a<0:
    b+=a
print(max(0,a),max(0,b))
# ABC149B - Greedy Takahashi
def main():
    A, B, K = map(int, input().split())
    if K <= A:
        print(A - K, B)
    else:
        print(0, max(0, B - (K - A)))


if __name__ == "__main__":
    main()
a, b, k = map(int, input().split())
print(f"{max(a-k,0)} {max(b-max(k-a,0),0)}")
a,b,k = map(int,input().split())
print(max(0,a-k),min(b,max(0,a+b-k)))
a,b,c=map(int,input().split())
aa=max(0,a-c)
print(aa,max(0,a+b-aa-c))
a, b, k = map(int, input().split())
if k < a:
    print(str(a - k) + " " + str(b))
elif a <= k and k < a + b:
    print(str(0) + " " + str(b - k + a))
elif k >= a + b:
    print(str(0) + " " + str(0))
a,b,k = map(int,input().split())

if k <= a:
  print(a-k,b)
elif k <= a+b:
  print(0,b+a-k)
else:
  print(0,0)
A,B,K = [int(i) for i in input().split(" ")]

def check(A,B,K):
    if A > 0:
        if A > K:
            A-=K
            K = 0
        else:
            result = K-A
            A = 0
            K = result
    if B > 0:
        if B > K:
            B-=K
        else:
            B = 0
    return "{0} {1}".format(A,B)

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

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

print('{} {}'.format(A,B))
a, b, k =map(int, input().split())

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

elif a+b <= k:
    a = 0
    b = 0

else:
    b = a+b-k
    a = 0
    

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

if a>=k:
    a-=k
    print(a,b)
else:
    k -=a
    a =0
    b =max(0,b-k)
    print(a,b)
inputted = list(map(int, input().split()))
A = inputted[0]
B = inputted[1]
K = inputted[2]

A2 = max([0, A - K])
B2 = max([0, B - max([0, K - A])])

answer = '{} {}'.format(A2, B2)

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

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

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

a_ans = 0 if k >= a else a - k

b = 0 if k >= (a + b) else (b - k + a if k >= a else b)

print(str(a_ans) + ' ' + str(b))
a, b, k = map(int, input().split())

n_takahashi = a
n_aoki = b

cookies_to_eat = k
if n_takahashi > cookies_to_eat:
    n_takahashi = n_takahashi - cookies_to_eat
    cookies_to_eat = 0
else:
    cookies_to_eat = cookies_to_eat - n_takahashi
    n_takahashi = 0

if n_aoki > cookies_to_eat:
    n_aoki = n_aoki - cookies_to_eat
    cookies_to_eat = 0
else:
    cookies_to_eat = cookies_to_eat - n_aoki
    n_aoki = 0

print('{} {}'.format(n_takahashi, n_aoki))
A, B, K = map(int, input().split())
if A >= K:
    A = A - K
else:
    B = B - (K - A)
    A = 0
    if B < 0:
        B = 0

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

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

A -= n
K -= n

n = min(B, K)
B -= n

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

if A>=K:
	print(A-K, B)

else:
	if A+B>=K:
		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
    if b < 0:
        b = 0
print("{0} {1}".format(a, b))
import fileinput

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=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)
a,b,k = (int(w) for w in input().split()[:3])

if a > k:
    print(a-k, b)
    exit()
else:
    k -= a

if b > k:
    print(0, b-k)
else:
    print(0, 0)
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**8)
INF = float('inf')
MOD = 10**9+7


def main():
  A, B, K = map(int, readline().split())
  if A>=K:
    print(A-K, B)
  else:
    print(0, max(B-K+A,0))
  
  
  
  
if __name__ == '__main__':
  main()
a, b, k = map(int, input().split())
if a >= 1 and a <= k:
    k -= a
    a = 0

elif a >= 1 and a > k:
    a -= k
    k -= a

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


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

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

S=max([0,A-K])

if A<K:
  T=max([0,B-(K-A)])

else:
  T=B

print(str(S)+" "+str(T))
A, B, K = [int(x) for x in input().split()]
if K <= A:
    print(A - K, B)
else:
    print(0, max(0, A + B - K))
def solve(a,b,k):
  if k <= a: return a - k, b
  elif k <= a + b: return 0, b - (k - a)
  else: return 0, 0

a,b,k = map(int,input().split())
ans_1, ans_2 = solve(a,b,k)
print(f"{ans_1} {ans_2}")
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

A,B,K = map(int, read().decode("utf-8").split())

if K > A:
  K = K - A
  A = 0
else:
  A = A - K 
  print(A, B)
  quit()

if K > B:
  K = K - B
  B = 0
else:
  B = B - K
  print(A, B)
  quit()

print(0, 0)
A,B,K=map(int,input().split())
print(A-K,B) if K<=A else print(0,B-(K-A)) if K<=A+B else print(0,0)
#!/usr/bin/env python3

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



main()
A, B, K = map(int, input().split())
if A >= K:
  A = A - K
elif A < K:
  B = B - (K - A)
  A = 0
 
print('{} {}'.format(A, max(0, B)))
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)
A, B, K = map(int, input().split())
print(max(0, A - K), max(0, min(A + B -K, B)))
def main():
    import sys
    input = sys.stdin.readline

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

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


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

AK = A-K

if AK < 0:
    BK = AK+B
    if BK < 0:
        print(0, 0)
    else:
        print(0, BK)
else:
    print(AK, B)
A,B,K = map(int,input().split())

if K <= A :
    print(A-K,B)
elif A < K < A + B :
    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 {0}".format(b-(k-a)))
else:
    print("{0} {1}".format(a-k,b))
a,b,k = map(int,input().split())

if a-k >= 0:
    t = a-k
    a = b
else:
    t = 0
    a = max(0,b+(a-k))
print(t,a)
A,B,K = map(int,input().split())
if A+B<=K:
  print(0,0)
else:
  if A<=K:
    print(0,B-(K-A))
  else:
    print(A-K,B)
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)
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
inf = 10**17
mod = 10**9+7

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

x = y = 0
if a < k: x = 0
elif k < a:
    print(a - k, b)
    exit(0)
else: x = k - a

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

print(x, y)
# coding: utf-8

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

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

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

print('{} {}'.format(A,B))
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    a,b,k=INTM()
    if k<=a:
        a=a-k
    elif k<=a+b:
        b=b-(k-a)
        a=0
    else:
        a,b=0,0
    print(a,b)
if __name__ == '__main__':
    do()
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(a - k, b)
else:
    print(0, max(0, b - k + a))
a, b,k = map(int, input().split())
if a>=k:
    aa=a-k
    ba=b
elif a+b>=k:
    aa=0
    ba=b-(k-a)
else:
    aa=0
    ba=0

print("{} {}".format(aa,ba))
A,B,K = map(int,input().split())
if A >= K:
  print(A-K,B)
elif K >= A+B:
  print(0,0)
else:
  print(0,B-(K-A))
a, b, k = map(int, input().split())
if k <= a:
    print(a-k, b)
elif k - a <= b:
    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)
A, B, K = map(int, input().split())

a = 0
b = 0

a = max(a, A - K)
K = max(0, K - A)
b = max(b, B - K)

print(str(a) + " " + str(b))
a,b,k = list(map(int,input().split()))

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

if a+b <= k:
    print('0 0')
else:
    t = a-k if a-k > 0 else 0 
    ao = b-(k-a) if t == 0 else b
    print('{} {}'.format(t, ao))
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, 0)
A,B,K=(map(int,input().split()))
if A<=K:
    B=B-K+A
    A=0
    if B<0:
        B=0
else:
    A=A-K
print(A,B)
a, b, k = input().split()
a, b, k = int(a), int(b), int(k)

if k < a:
  a = a-k

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

print(a,b)
A, B, K = map(int, input().split())
if K > A + B:
  print(0, 0)
elif K <= A:
  print(A - K, B)
elif K - A <= B:
  print(0, B - (K - A))
a, b, k = list(map(int, input().split()))
if 0 <= a - k:
    print(a - k, b)
elif 0 < b - (k - a):
    print(0, b - (k - a))
else:
    print(0, 0)
x = input().split()
 
a = int(x[0])
b = int(x[1])
k = int(x[2])
 
if(a-k > 0):
  print(a-k,b)
  exit()
elif(a-k == 0):
  print(0,b)
  exit()
elif(a-k < 0 and b-(k-a) > 0):
  print(0,b-(k-a))
  exit()
elif(a-k < 0 and b-(k-a) == 0):
  print(0,0)
  exit()
elif(a-k < 0 and b-(k-a) < 0):
  print(0,0)
  exit()
a, b, k = map(int, input().split())

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

if a-k >= 0:
    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 < 0:
    print(0, max(0, b - abs(a - k)))
else:
    print(a - k, b)
A, B, K = map(int, input().split())

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

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

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

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

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

if k <= a:
    a = a - k
    print("{} {}".format(a,b))
else:
    if k >= a + b:
        print("0 0")
    else:
        print("0 {}".format(b - (k - a)))
A,B,K = (int(x) for x in input().split())

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

print(max(a-k,0),min(b,(max(b-(k-a),0))))
a,b,k = map(int,input().split())
taka = a
aoki = b
recur = k
if taka>=k:
  print("{} {}".format(taka-k,aoki))
elif k>=taka and (aoki+taka)>=k:
  print("{} {}".format(0,aoki-(k-taka)))
elif (aoki+ taka)<=k:
  print("0 0")
A, B, K = map(int,input().split())
r1 = A
r2 = B
if A >= K:
  r1 = A - K
elif B > (K - A):
  r1 = 0
  r2 = r2 - (K - A)
else:
  r1 = 0
  r2 = 0
print(r1, r2)
a, b, k = map(int,input().split())
# for i in range(k):
#     if a >= 1:
#         a -= 1
#     elif b >= 1:
#         b -= 1
#     else:
#         continue

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

print(a, b)
a,b,c = map(int, input().split())
if a<=c:
    if b<=c-a:
        print('0 0')
    else:
        print('0 {}'.format(a+b-c))
else:
    print('{} {}'.format(a-c,b))
A, B, K = map(int, input().split())
A_ = min(A, K)
print(A-A_, max(0, B-(K-A_)))
n = list(map(int,input().split()))
ans1 = n[0] - n[2]
ans2 = (n[0] + n[1]) -  n[2]

if ans1 <= 0:
    ans1 = 0

if ans1 > 0:
    ans2 = n[1]
elif ans2 <= 0:
    ans2 = 0

print(ans1,ans2)
#!/usr/bin/env python3

A, B, K = list(map(int, input().split()))
nokori = K
if A > 0:
    if K <= A:
        nokori = 0
        A = A - K
    else:
        nokori = K - A
        A = 0
if nokori > 0 and B > 0:
    if nokori <= B:
        B = B - nokori
        nokori = 0
    else:
        nokori -= B
        B = 0

ans = "{} {}".format(A, B)

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


if __name__ == '__main__':
    main()
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 = [int(num) for num in input().split(' ')]

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

if A > K:
    A -= K
else:
    K -= A
    A = 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)
elif b>=k-a:
    print(0, b-k+a)
else:
    print(0, 0)
a, b, k = map(int, input().split())

if k > a:
	k -= a
	a = 0
else:
	a -= k
	k = 0

if k > b:
	b = 0
else:
	b -= k

print("{} {}".format(a, b))
"""
author : halo2halo
date : 8, Jan, 2020
problem : ABC149
"""

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

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

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

x = min(B, K)
B -= x

print(A, B)
a, b, k = map(int, input().split())
 
if a >= k:
  print(a-k, b)
else:
  if a+b > k:
    print(0, b-(k-a))
  else:
    print(0,0)
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())

a = 0
b = 0

if A <= 10**12 and B <=10**12 and K <= 10**12:
    if A >= K :
        a = A-K
        b = B
    elif  (A + B) >=K:
        a = 0
        b = B-(K-A)
    elif  (A + B)  < K:
        a = 0
        b = 0
else :
    a = 0
    b = 0

print(a,b,end='')
a, b, k = map(int, input().split())

if a >= k:
    print(a-k, b)
elif b >= k-a:
    print(0, b - (k-a))
else:
    print(0, 0)
A, B, K = [int(i) for i in 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 = 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 K >= A:
    K = K - A
    A = 0
    if K >= B:
        K = K - B
        B = 0
    else:
        B = B - K

else:
    A = A - K

print(A, 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, c = map(int, input().split(' '))
 
if c >= a:
  c -= a
  b = max(0, b-c)
  print(0, b)
else:
  print(a-c, b)
A,B,K = map(int, input().split())
if A+B < K:
    print(0,0)
elif A >= K:
    print(A-K,B)
else:
    print(0,A+B-K)
a,b,k = map(int,input().split())
takahashi = 0
aoki = 0
if a >= k:
    takahashi = a-k
    aoki = b
else:
    takahashi = 0
    aoki = b-k+a
if aoki < 0:
    aoki = 0
print(takahashi,aoki)
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())
change_a = max(0, a - k)
if a < k:
    b = max(0, b - (k - a))
print(change_a, b)
a, b, k = map(int, input().split())

if a <= k:
  if b-(k-a) > 0:
    print(0, b-(k-a))
  else:
    print(0, 0)
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())

if a >= k:
    a -= k
    print(a, b)

else:
    k -= a
    a = 0
    if  b >= k:
        b -= k
        print(a, b)
    else:
        b = 0
        print(a, b)
import sys
sys.setrecursionlimit(10 ** 7)
read = sys.stdin.buffer.read 
input = sys.stdin.buffer.readline
def inputS(): return input().rstrip().decode()
readlines = sys.stdin.buffer.readlines  

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

if K <= A:
  A -= K
  print(A, B)
elif K <= (A+B):  
  B -= (K-A)
  print(0, B)
else: # (A+B) < K
  print(0, 0)
a , b , k  = map(int,input().split())
if k - a >= b:
  a = 0
  b = 0
elif k >= a and  k - a < b:
  k -= a
  a = 0
  b -= k - a
else:
  a -= k
print(a, b)
a,b,k = map(int,input().split())
if k<a:
    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 > 0:
    a = a - k
elif a - k < 0:
    if b - (k - a) > 0:
        b = b - (k - a)
        a = 0
    else:
        b = 0
        a = 0
else:
    a = 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())
def split_A_K_B(A, B, K):
    if K >= A:
        K -= A
        A = 0
    else:
        A -= K
        return A, B
    if K >= B:
        K -= B
        B = 0
    else:
        B -= K
    return A, B
A, B = split_A_K_B(A, B, K)
print("{} {}".format(A, B))
a,b,k=list(map(int,input().split()))
if a>=k:
    a=a-k
    print(a,b)
elif a<k:
    k=k-a
    b=b-k
    print(0,max(0,b))
a, b, k = map(int, input().split())

if (a - k) <= 0:
    k -= a
else:
    print(a-k, b)
    exit()

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

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

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

def ans(a,b,k):
    if a >= k:
        a -= k
        print(a,b)
        return
    else:
        k -= a
        a = 0
        if b >= k:
            b -= k
            print(a,b)
            return
        else:
            print(0,0)
            return

ans(a,b,k)
N,M,L = (int(x) for x  in input().split())

if N > L:
  print(N-L,M)
elif N+M > L:
  print(0,M-L+N)
else:
  print(0,0)
a,b,k=map(int,input().split())
if (a<k):
  b-=k-a
  if (b<0):
    b=0
  a=0
else:
  a-=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,a+b-k)
A, B, K = list(map(int, input().split()))

if A > K:
  Ta = A - K
  Ao = B
  
elif B > K - A:
  Ta = 0
  Ao = B - (K - A)
  
else:
  Ta = 0
  Ao = 0
  
print(Ta, Ao)
import sys

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


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

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




if __name__ == '__main__':
    main()
#!/usr/bin/env python3
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=[int(x) for x in input().split()]
if a>=k:
  a-=k
  print(str(a)+' '+str(b))
else:
  k-=a
  a=0
  if b>=k:
    b-=k
    print(str(a)+' '+str(b))
  else:
    b=0
    print("0 0")
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:
    print(a-k, b)
else:
    print(0, max(0, b-(k-a)))
a, b, k = map(int, input().split())

eat = min(k, a)
a -= eat

eat = min(b, k - eat)
b -= eat

print(a, b)
a, b, k = [int(x) for x in input().split(" ")]

if a + b == k or a + b < k or (a == 0 and b == 0):
  print(0, 0)
elif a + b > k and a >= k:
  print(a-k, b)
elif a + b > k and a < k:
  print(0, a+b-k)
variables_list = input()
variables_list =  list(map(int, variables_list.split(" ")))


def func(variables_list):
    if variables_list[0] + variables_list[1] > variables_list[2]:
        if variables_list[0] > variables_list[2]:
            return (variables_list[0] - variables_list[2], variables_list[1])
        else:
            return (0, variables_list[1] - (variables_list[2] -variables_list[0]))
        return variables_list[0] + variables_list[1] - variables_list[2]
    else:
        return (0, 0)


print(str(func(variables_list)[0]) + " " + str(func(variables_list)[1]))
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)
def solve():
    A,B,K = [int(i) for i in input().split()]
    if K >= A:
        B = max(0, B-(K-A))
        A = 0
    else:
        A -= K
    print(A, B)

if __name__ == "__main__":
    solve()
a, b, k = map(int, input().split())

if a+b <= k: print(0,0)
elif a >= k: print(a-k, b)
else: print(0, b-(k-a))
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()
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:
  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(k<=a):
    a-=k
    print(a,b)
else:
    k-=a
    a=0
    if(k<=b):
        b-=k
        print(a,b)
    else:
        b=0
        print(a,b)