peterverebics/CodeNet_Python_118 huggingface dataset:
import sys
A,B,K = map(int,input().split())
if A >= K:
    A -= K
    print(str(A) + ' ' + str(B))
    sys.exit(0)
else:
    B = B - (K-A)
    A = 0
print(str(A) + ' ' + str(B))
a, b, k = list(map(int,input().split()))
print(a,b,k)
if a+b < k:
  a = 0
  b = 0
elif a >= k:
  a -= k
else:
  b = b - (k-a)
  a = 0
print(a,b)
A, B, K = map(int, input().split())
if K >= A:
    A, K = 0, K - A
else:
    A = A - K
    K = 0
# print(A, B, K)
if K >= 1:
    B, K = B - K, K - B

print(A, B)
# ABC149B - Greedy Takahashi
def main():
    A, B, K = map(int, input().split())
    if K <= A:
        print(A - K, B)
    else:
        print(0, B - (K - A))


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

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

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

if A - K >= 0:
  A = A - K
  print(A, B)
else:
  B = B - (K - A)
  A = 0
  print(A, B)
## coding: UTF-8
from decimal import *
from itertools import permutations, combinations,combinations_with_replacement,product

s = input().split()
t = [int(p) for p in s]

#print(t)
A = t[0]
B = t[1]
K = t[2]



a = max(0, A - K)
#print(a)

b = min(B, B - K + A)
#print(b)
print('{} {}'.format(a, b))
a,b,k=map(int,input().split())


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

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

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

print(check(A,B,K))
A, B, K = map(int, input().split())
if 0<=K<=A:print(A-K,B)
elif A<K<=B:print(0,B-K+A)
elif B<K:print(0,0)
x = input().split()
a = int(x[0])
b = int(x[1])
c = int(x[2])

if c % 2 == 0:
    c1 = c / 2
    a = a - c1
    b = a - c1
    if (a < 0):
        a = 0
    if (b < 0):
        b = 0
else:
    c = c - 1
    c1 = c / 2
    c1 = c1 + 1
    a = a - c1
    b = b - c1
    b = b + 1
    if a < 0:
        a = 0
    if b < 0:
        b = 0

print("{} {}".format(int(a), int(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())

num_eat_A = min([A, K])
if num_eat_A < K:
  num_eat_B = K - num_eat_A
else:
  num_eat_B = 0
  
A_remain = A - num_eat_A
B_remain = B - num_eat_B

print("{} {}".format(A_remain, B_remain))
import sys

def S(): return sys.stdin.readline().rstrip()

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

if K <= A:
    print(K-A,B)
elif K >= A+B:
    print(0,0)
else:
    print(0,B-K+A)
a = list(map(int,input().split()))
A = a[0]
B = a[1]
K = a[2]
taka = A
aoki = B
if K < A:
    aoki = B
    taka = A - K
elif K>=(A+B):
    pass
else:
    taka = 0
    b = K - A
    aoki = B - b
print(str(taka)+" "+str(aoki))
def solve():
    A, B, K = map(int, input().split())
    ans = []
    if A + B == K:
        ans = [0, 0]
    elif A + B < K:
        ans = [0, 0]
    elif K <= A:
        ans = [A-K, B]
    elif A < K <= B:
        ans = [0, B+A-K]
    print(*ans)

# print(solve())
solve()
x,y,k=map(int,input().split())
m=min(x,y,k)
if(x==m):
    print(0,y-m+1)
elif(y==m or k==m):
    print(x-m,y-m)
a, b, k = map(int, input().split())

if a>=k:
  print(a-k,b)
elif a<k and b>=k:
  print(0,b-(k-a))
else:
  print(0,0)
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


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


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

if A == 0 and B == 0:
    print(A, B)
    exit()

if A >= K:
    remain_A = A - K
    remain_B = B
else:
    remain_A = 0
    remain_B = B - (K - A)

print(remain_A, remain_B)
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 = list(map(int,input().split()))
if a[0]-a[2]>=0:
    a[0]=a[0]-a[2]
    a.pop()
    print(a)
else:
    a[1]=a[1]+a[0]-a[2]
    a[0]=0
    a.pop()
    print(a)
a, b, k = map(int, input().split());

a = max(0, a - k);

if a == 0:
  b = max(0, b - k + a);
  
print(a,b);
a,b,k=map(int,input().split())
if a>k:
  print(a-k,b)
elif a-k<0 and b-k+a>0:
  print('0',b-k+a)
elif a-k<0 and b-k+a<0:
  print('0','0')
#スペース区切りの整数の入力
A, B ,K = map(int, input().split())

if(K>A):
  nokori = K - A
  ans = B - nokori
  print("0",ans)
else:
  nokori = A - K
  print(nokori,B)
A,B,K = map(int,input().split())
if A >= K:
    A -= K
    K = 0
else:
    A = 0
    K -= A
if B >= K:
    B -= K
    K = 0
else:
    B = 0
    K -= B
print(A,B)
a,b,c=map(int,input().split())
if a >= c:
  print(a-c,0)
else:
  print(0,max(a+b-c,0))
A, B, K = map(int, input().split())
if A >=  K:
    la = A - K
    lb = B
else:
    la = 0
    lb = A + B - K
print(la, lb)
a, b, k = map(int, input().split())

if a != 0 and a >= k:
    a -= k
elif a != 0 and a < k:
    k -= a
    a = 0
    if b != 0 and b >= k:
        b -= k
    elif b != 0 and b < k:
        b = 0

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

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

for i in range(K):
    if A>=1:
        A=A-1
    else:
        if B>=1:
            B=B-1
        else:
            exit()
print(A, B)
A, B, K = map(int, input().split())

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

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

print(str(A) + ' ' + str(B))
def main():
    A,B,K = list(map(int,input().split()))

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


if __name__ == "__main__":
    main()
a,b,k=map(int,input().split())
if a==0 and b>=k:
    print(0,b-k)
elif a>=k and b==0:
    print(a-k,b)
else:
    print(0,0)
T, S, K = list(map(int, input().split()))

if T - K > 0:
    print(T - K, S)

else:
    print(0, T - K + S)
a,b,k = map(int, input().split())

print(a,b,k)

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


def main():
    
    takahashi, aoki, action_count = map(int, input().split(' '))

    if action_count < takahashi:
        takahashi = action_count - takahashi
        aoki = aoki
    elif action_count <= (takahashi + aoki):
        aoki -= (action_count - takahashi)
        takahashi = 0
    else:
        takahashi = 0
        aoki = 0
    
    print(takahashi, aoki)

    return 0
    
    
if __name__ == '__main__':
    main()
a,b,k=map(int,input().split())
print(a-k,b) if a>=k else print(0,a+b-k)
a, b, k = map( int, input().split())
 
a_aft = max( 0, a - k)
b_aft = max( 0, b - ( k - a ))
print( a_aft, b_aft )
a, b, k = map(int, input().split())
if a-k < 0:
  b -= (k-a)
  a = 0
  print(a,b)
else:
  print(a-k,b)
a,b,k=map(int,input().split())
if a>=k:
    a1=a-k
else:
    a1=0
if b>=k-a:
    b1=b-(k-a)
else:
    b1=0
print(a1,b1)
a, b, k = map(int , input().split())

#もし高橋君がクッキーを 1 枚以上持っているなら、高橋君のクッキーを 1 枚食べる。
#そうでなく、もし青木君がクッキーを 1 枚以上持っているなら、青木君のクッキーを 1 枚食べる。
#高橋君も青木君もクッキーを持っていないなら、何もしない。

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

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

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

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

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

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

print('{} {}'.format(A, max(0, B)))
A, B, K = map(int, input().split())

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

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

aoki = max(0, b-k)

print(takahashi, aoki)
"""
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().decode('utf-8').split())

TA = max(A - K, 0)
AO = min(B, B - (K - A))
A0 = max(AO, 0)
print(TA, AO)
A, B, K = map(int, input().split())

if K == 0:
    print(A, K)

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

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

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

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

if K % 2 == 0:
    print(A-K//2, B - K//2)

else:
    print(A-(K//2+1), B - K//2)
a, b, k = map(int, input().split())
if a - k > 0:
    a = a - k
elif a - k < 0:
    b = b - (k - a)
    a = 0
else:
    a = 0
print(a, b)
a, b, k = map(int, input().split())
if a >= k and b >= k:
    a = a-k
    b = b-k
elif a >= b:
    a = max(0, a-k)
    b = max(0, b-k)
else:
    b = b - a + 1
    a = 0
print(' '.join(map(str, (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 - k)

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

if a>k:
  print(a +b-k)
else:
  if a+b>k:
    print(a+b-k)
  else:
    print(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(a-k,b-(k-a))
A,B,K=map(int,input().split())
if A-K>=0:
  print(A-K,B)
elif A<=K and K<=A+B:
  print(0,A+B-K)
elif A>=K:
  print(A-K,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 a==0 and b==0:
    print(0, 0)
elif k>a:
    print(0, end=" ")
    print(b-(k-a))
elif k<a:
    print(a-k, b)
if a==k:
    print(0, b)
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

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

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

print(0, B-(K-A))
import sys

a, b, k = map(int, sys.stdin.readline().split())

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

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

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

if(a<=c):
    p = 0
    if(b<=c-a):
        q = 0
    else:
        q = b -(c-a)
else:
    p = c-a
    q = int(b)

print(str(p) + " " + str(q))
A, B, K = map(int, input().split())
if K <= A:
  print(A-K, B)
else:
  if K <= A + B:
    print(0, B-K-A)
  else:
    print(0, 0)
A,B,K=map(int,input().split())
print(A,B,K)
if A+B<=K:
    print(0,0)
elif K>=A:
    print(0,B-K+A)
else:
    print(A-K,B)
a, b, k = map(int,input().split())
if a < k:
  print(0,(b - k + a), sep=" ")
elif a > k:
  print((a-k),b,sep=" ")
else:
  print(0, 0,sep=" ")
a,b,c=map(int,input().split())
if a<c:
  res=0
  rem=c-a 
  if rem<b:
    res=b-rem  
  else:
    res=rem-b
  print(0,res) 
elif a>c:
  print(a-c,b)
a, b, k = [int(i) for i in input().split()]
if k == 0:
    taka = a
    aoki = b
elif k <= a:
    taka = a-k
    aoki = b
elif k > a:
    taka = 0
    aoki = b-(k-a)
elif k > a+b:
    taka = 0
    aoki = 0
print(taka, aoki)
A, B, K = map(int, input().split())
A = max(0, A-K)
K = max(0, K-A)
if K > 0:
    B = max(0, B-K)
print(str(A) + ' ' + str(B))
A,B,K=map(int,input().split())
if A>=K:
    print(A-K,B)
if A<K and A+B>=K:
    print(0,B-(K-A))
else:
    print(0,0)
A, B, K = [int(s) for s in input().split()]
takahashi = A - K if A - K > 0 else 0
aoki = B - (K - A if takahashi == 0 else 0)
print(takahashi, aoki)
A, B, K = list(map(int, input().split()))

if A > K:
    print(A - K, B)
else:
    print(0, B - (K - A))
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

    k = 0 if k < 0 else k

    b = b - k if b > 0 else 0

    print(a, b)

if __name__ == '__main__':
    main()
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    a, b, k = list(map(int, readline().split()))
    print(a - min(a, k), b - (k - min(a, k)))


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

if a > k:
  print(a-k,b)
elif a == k:
  print(0,b)
elif (a+b) == k:
  print(0,0)
else:
  print(0,a+b-k)
a,b,k = map(int,input().split())
a_end = max(a-k,0)
b_end = max(a+b-k,0)
print(a_end,b_end)
a,b,k = map(int, input().split())
sa = k-a
a = max(a-k, 0)
b = max(b-sa, 0)
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(K - A, B)
a,b,k=map(int,input().split())
print( max(a+b-k,0) )
# -*- coding: utf-8 -*-
stra, strb, strk = input().split()
a = int(stra)
b = int(strb)
k = int(strk)
if a >= k :
  a = a - k
else:
  a = 0
  b = b - (a - k)
  if b < 0:
    b = 0
print("{} {}".format(a, b))
A,B,K=map(int,input().split())
if A>=K:
    A=A-K
elif A+B>=K:
    B=B+A-K
    A=0
if B<0:
    B=0
print(A,B)
A, B, K = map(int, input().split())

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

print(A,B)
import sys
input = sys.stdin.readline
MOD = 10**9 + 7
INF = float('INF')

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

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

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

b_end = min(a_end,0) + b
print(max(a_end,0),b_end)
a, b, k = map(int, input().split())

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

ans_a = 0
ans_b = 0
ans_a = max(0,a-k)

if( ans_a == 0):
    ans_b = max(0, b-(k-a))


print("{0} {1}".format(ans_a,ans_b))
a,b,k=map(int,input().split())
print(max(a-k,0),max(b-min(k-a,0),0))
A, B, K = (int(x) for x in input().split())
if K != 0:
  if K > A:
    B -= K - A
    A = 0
  else:
    A -= K
print(A, B)
A,B,K=map(int,input().split())
M=min(A,B)
if M>=K:
  print(A-K,B-K)
else:
  print(A-M,B-M)
a,b,k=map(int,input().split())
if a>=k:
  a-=k
else:
  a=0
  b-=(k-a)
  b=max(b,0)
print(str(a)+" "+str(b))
a,b,k = map(int,input().split())
for i in range(k):
    if a == 0:
        b += -1
    if a:
        a += -1
    if b== 0:
        break
print(a,b)
A,B,K=map(int,input().split())
if K-A<=0:
    print(A-K,'',B)
elif K-A>0:
    print(0,'',B-(K-A))
# ABC 149: B – Greedy Takahashi
A, B, K = [int(s) for s in 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())
tmp=0
if a >= k:
  a-=k
else:
  tmp+=a
  a=0
if b >= k-tmp:
  b-=(k-tmp)
else:
  b=0
print(a,b)
a, b, k = map(int, input().split())

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

    return 0, b - (k - a)

a, b, k = map(int, input().split())
print(actual(a, b, k))
a,b,k=map(int,input().split())
if k>a and k<a+b:
    k=k-a
    a=0
    b=b-k
elif k<a:
    a=a-k
else:
    a=0
    b=0
print(a,b)
# https://atcoder.jp/contests/abc149/tasks/abc149_a

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

tcookie = 0
acookie = 0

# KがAより大きい
if A > K :
    tcookie = K - A
    acookie = B

# KがA以下
if A <= K : 
    tcookie = 0
    # KがBより大きい
    if ( K - A ) < B:
        acookie = B - (K - A) 
    # KがB以下
    if ( K - A ) >= B:
        acookie = 0

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

if a>=k:
    x,y=a-k,b
else:
    x,y=0,b-(k-a)
print('{} {}'.format(x,y))
import time
a,b,k = map(int,input().split())

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

if a >= k:
    print((a-k),b)
else:
    print(0,b-(k-a))
a,b,k = [int(x) for x in input().split()]
if a > k:
  print(a-k,b)
else:
  print(0,a+b-k)
a,b,k = map(int,input().split())
if a+b <= k:
    print("0 0")
    exit()
if a <= k:
    a = 0
    b = b - k + a
    print(a,b)
else:
    print(a-k,b)
a, b, k = map(int, input().split())

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

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

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

if min(A, K) == K:
    print(A - K, B)
else:
    print(0, B - (K - A))
a,b,k=map(int,input().split())
x=abs(a-k)
a=max(a-k,0)
b=b-a
print(str(a)+" "+str(b))
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 a > k:
    print(a-k,b)
elif a < k and 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, B-(K-A))
a, b, k = map(int, input().split())
s = k - a
t = b - s
if s > 0:
    print("0 " + str(t))
else:
    print(str(s) + " " + str(b))
a,b,k=map(int,raw_input().split())
if a>k:
  print a-k,b
elif a<k:
  print 0,b-(k-a)
else:
  print 0,0
N,M,L = (int(x) for x  in input().split())

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

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

#もし高橋君がクッキーを 1 枚以上持っているなら、高橋君のクッキーを 1 枚食べる。
#そうでなく、もし青木君がクッキーを 1 枚以上持っているなら、青木君のクッキーを 1 枚食べる。
#高橋君も青木君もクッキーを持っていないなら、何もしない。

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


if __name__ == "__main__":
    main()
a,b,k = map(int,input().split())
if a<=k:
  print(0,a+b-k)
else:
  print(a-k,b)
a, b, k = map(int, input().split())
if a < k:
  a = 0
  k -= a
  b = max(b - k, 0)
else:
  a -= k
print(a, b)
a,b,k = map(int,input().split())
if a >= k:
    ans1 = k
    ans2 = b 
if a < k:
    if (a+b) <= k:
        ans1 = 0
        ans2 = 0
    else:
        ans1 = 0
        ans2 = b-(k-a)
print(ans1,ans2)
x = input().split()

a = int(x[0])
b = int(x[1])
k = int(x[2])

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

A, B=A-min(A, K), B+min(0, A-K)

print(A, B)
def actual(a, b, k):
    if a >= k:
        return '{} {}'.format((a - k), b)

    return '0 {}'.format(b - (k - a))


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

a = max(a - k, 0)
b = max(b - (a - k), 0)
print(a,b)
a = input().rstrip().split(' ')
b=[int(i) for i in a]
print(b)
S,T,U=b[0],b[1],b[2]
if S>U:
    S1=S-U
    print(S1,T)
elif S==U:
    print(0,T)
elif S<U and S+T>U:
    U1=U-S
    T1=T-U1
    print(0,T1)
else:
    print(0,0)
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
    out = '0 ' + str(b - a2)
    print(out)
A,B,K = map(int,input().split())

def eat_cookie(A,B,K):
    if A >= K:
        return A-K,B
    else:
        if B-A+K > 0:
            return 0,B-K+A
        else:
            return 0,0


resultA,resultB = eat_cookie(A,B,K)
print(resultA,resultB)
A, B, K = list(map(int, input().split()))
a = max(A - K, 0)
b = max(B - (K - A), 0)
print(a, b)
import sys
a, b, k = map(int, input().split())

if b == 0:
    if a-k >= 0:
        print(a-k, 0)
    else:
        print(0, 0)
    sys.exit()
elif a == 0:
    if b-k >= 0:
        print(0, b-k)
    else:
        print(0, 0)
    sys.exit()
    
if a >= k:
    print(0, b -(k-a))
else:
    print(k-a, b)
a, b, k = [int(x) for x in input().split(" ")]

if a + b == k or a + b < k:
  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)
a, b, k = map(int,input().split())
if a <= k:
  print(0,(b - k + a),sep=" ")
elif a+b >= k:
  print((a-k),b,sep=" ")
else:
  print(0,0,sep+" ")
a,b,k=map(int,input().split())
if a>k:
  print(a-k,b)
elif k-a>0:
  c=k-a
  print('0',b-c)
else:
  print(0,0)
A,B,K=map(int,input().split())
if A<=K:
    print(0,B-K+A)
else:
    print(A-K,B)
a, b, k = list(map(int,input().strip().split(' ')))

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

if A < K:
  K = K - A 
  A = 0
if A > K:
  A = A - K
  K = 0
if B <= K and A == 0:
  K = K - B
  B = 0
if B >= K and A == 0:
  B = B - K
  K = 0

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

for i in range(K):
  if A > 0:
    A -= 1
    continue
  else:
    continue
  
  if  B > 0:
    B -= 1
    continue
  else:
    continue
  
  if A ==0 and B==0:
    continue
    
    
print(A,B)
a,b,k=map(int,input().split())
if a>k:
  print(a-k,b)
else:
  c=k-a
  print('0',b-c)