Problem:
 Score : 200 points    Problem Statement Takahashi has A cookies, and Aoki has B cookies.
Takahashi will do the following action K times:   If Takahashi has one or more cookies, eat one of his cookies.  Otherwise, if Aoki has one or more cookies, eat one of Aoki's cookies.  If they both have no cookies, do nothing.   In the end, how many cookies will Takahashi and Aoki have, respectively?      Constraints  0 \leq A \leq 10^{12}  0 \leq B \leq 10^{12}  0 \leq K \leq 10^{12}  All values in input are integers.         Input Input is given from Standard Input in the following format:  A  B  K       Output Print the numbers of Takahashi's and Aoki's cookies after K actions.        Sample Input 1 2 3 3      Sample Output 1 0 2  Takahashi will do the following:   He has two cookies, so he eats one of them.  Now he has one cookie left, and he eats it.  Now he has no cookies left, but Aoki has three, so Takahashi eats one of them.   Thus, in the end, Takahashi will have 0 cookies, and Aoki will have 2 .       Sample Input 2 500000000000 500000000000 1000000000000      Sample Output 2 0 0  Watch out for overflows.

Solution (Python):

import sys
import numpy as np


def solve(A: int, B: int, K: int):
    if A<K:
        B-=(K-A)
        B=0 if B<0 else B
        A=0
    else:
        A-=K
    print(A,B)
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  
    B = int(next(tokens))  
    K = int(next(tokens))  
    solve(A, B, K)

if __name__ == '__main__':
    main()

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

Solution (Python):

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

Solution (Python):
import sys
a, b, k = map(int, input().split())
if a >= k:
    print(a-k, b)
    sys.exit(0)
elif a + b >= k:
    print(0, b-(k-a))
    sys.exit(0)
else:
    print(0, 0)

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

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

print(A, B)

Solution (Python):
A, B, K = map(int, input().split())
print(max(0, A-K), max(0, B-max(0, K-A)))

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

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

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

Solution (Python):
a,b,k = map(int, input().split())
if k >= a:
    k = k-a
    a = 0
else:
    a -= k
    k = 0

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

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

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

Solution (Python):
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)

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

Solution (Python):
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)

Solution (Python):
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)

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

if k >= a:
    k -= a
    a = 0
    if k >= b:
        k -= b
        b = 0
    else:
        b -= k
else:
    a -= k
print('{} {}'.format(a, b))

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

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

Solution (Python):
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)

Solution (Python):
A, B, K = map(int, input().split())
print(max(0, A - K), max(0, min(A + B -K, B)))

Solution (Python):
A,B,K=map(int, input().split())
if A>K:
  A=A-K
else:
  B=A+B-K
  A=0
if B<0:
  B=0
print('{:.0f}'.format(A)+" "+'{:.0f}'.format(B))

Solution (Python):
a,b,k = map(int,input().split())
tmp = k - a
if tmp < 0:
    tmp = 0
a = a - k
if a < 0:
    a = 0

b = b - tmp 

if b < 0:
    b = 0

print(a,b)

Solution (Python):
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)

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

Solution (Python):
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)
elif (a + b) < k:
  print(0, 0)

Solution (Python):
a, b, k = (int(x) for x in input().split())
if k<=a:
    print(a-k, b)
elif k<=a+b:
    print(0, a+b-k)
else:
    print(0, 0)

Solution (Python):
a,b,k = map(int,input().split())
a_ = max(0, a-k)
b_ = max(0, b - max(k-a, 0))
print('{} {}'.format(a_,b_))

Solution (Python):
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)

Solution (Python):
A,B,K = list(map(int,input().split()))
if K >= A:
    if B - (K - A) >= 0:
        print(str(0)+' '+str(B-(K-A)))
    else:
        print(str(0)+' '+str(0))
else:
    print(str(A - K) + ' ' + str(B))

Solution (Python):
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)

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

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

Solution (Python):
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)

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

Solution (Python):
a, b, k = map(int, input().split())
if k <= a:
    a1 = a - k
    b1 = b
elif a < k and k < a + b:
    a1 = 0
    b1 = b - (k-a)
else:
    a1 = 0
    b1 = 0

print(a1, b1)

Solution (Python):
A,B,K=map(int,input().split())
print(max(A-K,0),min(max(B-K+A,0),B),end=' ')

Solution (Python):
a, b, k = map(int, input().split())
print(max(a-k, 0), min(max(0, b+a-k), b))

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

Solution (Python):
a,b,k=[int(i) for i in 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)

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

tak = A
aok = B

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

print(tak, aok)

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

Solution (Python):
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)
elif A+B <= K:
    print(0,0)

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

Solution (Python):
A, B, X = list(map(int,input().split()))
if A > X:
  print(A-X, B)
elif A <= X and B > X - A:
  print(0, B-(X-A))
elif A == 0 and B == 0:
  print(0,0)
else:
  print(0,0)

Solution (Python):
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)

Solution (Python):
base = input().split()
a = int(base[0])
b = int(base[1])
k = int(base[2])
if a>=k:
    print(a-k,b)
elif a+b<k:
    print("0 0")
else:
    print(0,a+b-k)

Solution (Python):
a,b,c= input().split()
x,y,z=(int(a),int(b),int(c))
if x >= z:
    a_b = str(x-z)
    print(a_b +' '+ str(y))
elif x+y >= z:
    a_c = str(x+y-z)
    print('0 ' + a_c)
else:
    print('0 0')

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

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

Solution (Python):
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)

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

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

Solution (Python):
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)

Solution (Python):
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)
    if remain_B < 0:
        remain_B = 0

print(remain_A, remain_B)

Solution (Python):
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, readline().split())
if a + b < k:
    print(0, 0)
elif a < k:
    print(0, b - (k - a))
else:
    print(a - k, b)

Solution (Python):
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)

Solution (Python):
A, B, K = map(int, input().split())
print(max(0, A-K), max(0, B-max(0, K-A)))

Solution (Python):
a, b, k = map(int,input().split())
print(max(0,a-k),max(0,b+(a-max(a,k))))

Solution (Python):
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)

Solution (Python):

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

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
A0, B0, K = map(int, input().split())


A1 = max(0, A0 - K)

B1 = max(0, B0 - (K - (A0 - A1)))

print(A1, B1)

Solution (Python):
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)

Solution (Python):
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)

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

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
a,b,k = map(int,input().split())
ansa = 0
if a + b <k:
    print("0 0")
elif a < k:
    ansa =0
    ansb = b-(k-a)
    print(str(ansa)+" "+str(ansb))
else:
    ansa = a-k
    ansb = b
    print(str(ansa)+" "+str(ansb))

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

Solution (Python):
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)

Solution (Python):
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+(A-K))

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

Solution (Python):

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

for i in range(2):
    if K <= A: 
        A -= K
        K =0
        break
    elif 0 < A : 
        K -= A
        A =0
    elif K < B: 
        B -= K
        K = 0
        break

    elif B <= K:
        K -= B
        B =0
        break
    elif K <B:
        B -=K
        break

print(A,B)

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

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

Solution (Python):
a,b,c= input().split()
x,y,z=(int(a),int(b),int(c))
if x >= z:
    a_b = str(x-z)
    print(a_b +' '+ str(y))
elif x+y >= z:
    a_c = str(x+y-z)
    print('0 ' + a_c)
else:
    print('0 0')

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

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

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

Solution (Python):
s,t,n=map(int,input().split())

if s>=n:
  print(s-n,t)
elif s<n and t-n+s>=0:
  print(0,t-n+s)
elif s<n and t-n+s<0:
  print(0,0)

Solution (Python):
a, b, k = map(int, input().split())
c = min(a, k)
a -= c
k -= c
b -= min(b, k)
print('{} {}'.format(a, b))

Solution (Python):
a, b, k = map(int, input().split())
a2 = max(a-k, 0)
b2 = max(b - (k - (a - a2)), 0)
print(a2, b2)

Solution (Python):
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)

Solution (Python):
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)

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

total = a + b - k

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

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

Solution (Python):
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)

Solution (Python):
a, b, k = [int(i) for i in input().split()]
if a >= k:
    a = a - k
elif b >= k - a:
    b = b - k + a
    a = 0
else:
    a = 0
    b = 0
print(a,b)

Solution (Python):





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

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

print(a, b)

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

if a >= k:
    a = a - k
    print('{} {}'.format(a, b))
elif k <= a + b:
    b = b - (k - a)
    a = 0
    print('{} {}'.format(a, b))
else:
    a = 0
    b = 0
    print('{} {}'.format(a, b))

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

if A < K:
  fa = 0
else:
  fa = A - K
if K > A + B:
  fb = 0
elif A >= K:
  fb = B
else:
  fb = B - (K - A)
print(fa, fb)

Solution (Python):
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)

Solution (Python):
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()

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

Solution (Python):
A,B,K=map(int,input().split());t=A-K;print(max(t,0),max(min(t+B,B),0))

Solution (Python):
A, B, K = map(int, input().split())
t = A - K
print('%d %d' % (max(t, 0), max(min(t + B, B), 0)))

Solution (Python):
A,B,K = map(int, input().split())
A,K = max(0,A-K),max(K-A,0)
B = max(0,B-K)
print(A,B)

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

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

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

Solution (Python):
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

A, B, K = lr()
subtract = min(K, A)
A -= subtract
B = max(0, B - (K - subtract))
print(A, B)

Solution (Python):
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)

Solution (Python):
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()

Solution (Python):
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)

Solution (Python):
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))

Solution (Python):
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)

Solution (Python):




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

    if A > K:
        print(' '.join(map(str, [A-K, B])))
    else:
        print(' '.join(map(str, [0, max(0, B-K+A)])))


if __name__ == '__main__':
    main()

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

resolve()

Solution (Python):
abk=input().rstrip().split(" ")
a=int(abk[0])
b=int(abk[1])
k=int(abk[2])
if k<=a:
    takahashi=a-k
    aoki=b
elif k>a and k<=b+a:
    takahashi=0
    aoki=a+b-k
elif k>a+b:
    aoki=0
    takahashi=0
print(takahashi, end=" ")
print(aoki)

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

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

Solution (Python):
x,y,z = map(int,input().split())
if x >= z:
  print(x-z, y)
elif y >= z-x:
  print(0, y+x-z)
else:
  print(0, 0)

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

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

Solution (Python):
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)

Solution (Python):
a,b,k=map(int,input().split())
eat1=min(a,k)
k-=eat1
eat2=min(b,k)
print(a-eat1,b-eat2)

Solution (Python):
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)

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

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

Solution (Python):
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))

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

if __name__ == '__main__':
	main()

Solution (Python):
A,B,K = list(map(int,input().split()))
if K <= A:
    A = A - K
else:
    if K - A <= B:
        B = B - (K - A)
        A = 0        
    else:
        A = 0
        B = 0
print(A, B)

Solution (Python):

from decimal import *
from itertools import permutations, combinations,combinations_with_replacement,product

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


A = t[0]
B = t[1]
K = t[2]



a = max(0, A - K)


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

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

Solution (Python):
a, b, k = [int(i) for i in input().split()]

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

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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()

Solution (Python):
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)

Solution (Python):
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)

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

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

else:
    print(0,0)

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


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

else:
    print(0,0)

Solution (Python):
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))

Solution (Python):


import sys
input = sys.stdin.readline


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

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

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

if A >= K:
  ans_A = A - K
  ans_B = B
elif A + B >= K:
  ans_A = 0
  ans_B = B - (K - A)
else:
  ans_A = 0
  ans_B = 0

print(ans_A,ans_B)

Solution (Python):
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(a, b)

Solution (Python):
a, b, k = map(int, input().split())
print(max(a-k, 0), max(min(a+b-k, b), 0))

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

if k <= a:
    print("{} {}".format(a-k, b))
elif b - (k-a) > 0:
    print("{} {}".format(0, b-k+a))
else:
    print("0 0")

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

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

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

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

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

print(A, B)

Solution (Python):
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)

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

a = max(0,A-K)
b = max(0,B-max(K-A,0))
print(str(a) + " "+str(b))

Solution (Python):
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')

Solution (Python):
a, b, k = map(int, input().split())
ta = max(0, a-k)
k -= a-ta
tb = max(0, b-k)
print(ta, tb)

Solution (Python):
A,B,K = map(int,input().split())
AnsA = max(A-K,0)
if AnsA == 0:
  AnsB = max(A+B-K,0)
else:
  AnsB = B
Answer = [AnsA, AnsB]
print(*Answer)

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

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

Solution (Python):
A,B,K=map(int,input().split(' '))
if A>=K:
    A-=K
else:
    B-=(K-A)
    if B<0:
        B=0
    A=0

print (str(A)+' '+str(B))

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

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

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

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

if b < 0:
    print(0, 0)
else:
    print(a, b)

Solution (Python):


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

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

    print(A, B)


if __name__ == "__main__":
    solve()

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

Solution (Python):

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

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

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

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

Solution (Python):
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)

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

if A >= K:
    a = A - K
    b = B
elif A + B >= K:
    a = 0
    b = B - (K - A)
else:
    a = 0
    b = 0

print(a, b)

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

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

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

Solution (Python):
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)

Solution (Python):
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)

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

if A >= K:
    print(str(A-K) + " " + str(B))
elif A+B >= K:
    print("0 " + str(A+B-K))
else:
    print("0 0")

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

if a > k:
  print(str(a-k) + ' ' + str(b))
elif a <= k and a+b > k:
  print(str(0) +  ' ' + str(a + b -k))
else:
  print('0 0')

Solution (Python):
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)

Solution (Python):
ABK=list(map(int,input().strip().split()))

A=ABK[0]
B=ABK[1]
K=ABK[2]

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

print(A,B)

Solution (Python):
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)

Solution (Python):
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)

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

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

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

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

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

Solution (Python):

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))

Solution (Python):
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)

Solution (Python):
def main():
    a,b,k = map(int,input().split())
    if a >= k:
        a-=k
    else:
        b -= (k - a)
        a = 0
        if b < 0:
            b = 0
    print(str(a)+" "+str(b))
main()

Solution (Python):
a,b,c = map(int, input().split())
if a - c > 0:
  a -= c
  c = 0
else:
  c -= a
  a = 0
  if b - c > 0:
    b -= c
    c = 0
  else:
    c -= b
    b = 0
print(a,b)

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

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

Solution (Python):
import sys

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

if a<=k:
  k=k-a
  a=0
elif a>k:
  a=a-k
  print(a,b)
  sys.exit()
  
if b<=k:
  b=0
else:
  b=b-k
print(a,b)

Solution (Python):
import sys
input = sys.stdin.readline

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

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

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

if(a<=k):
  k-=a
  a=0
elif(a>k):
  a-=k
  k=0
if(b<=k):
  k-=b
  b=0
elif(b>k):
  b-=k
  k=0

print(a,b)

Solution (Python):
A,B,K = map(int,input().split())
if A >= K:
  A = A - K
  B = B
elif A < K and B >= K-A:
  B=B-(K-A)
  A=0
elif K > A+B:
  A=0
  B=0

out = str(A) + " " + str(B)
print(out)

Solution (Python):
a, b, k = map(int, input().split())
if k >= a:
    k -= a
    a = 0
else:
    a -= k
    k = 0

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

print(a, b)

Solution (Python):
import sys
import os

MOD = 10 ** 9 + 7


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    A, B, K = list(map(int, sys.stdin.buffer.readline().split()))
    print(A-K, B) if K <= A else print(0, B-(K-A)) if K <= A+B else print(0, 0)


if __name__ == '__main__':
    main()

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

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

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


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

Solution (Python):
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)

Solution (Python):
a, b, k =map(int, input().split())
ans1 =max(a-k,0)
if ans1==0:
  ans2 =max(b+a-k,0)
else:
  ans2 =b
print(ans1, ans2)

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

    print(A, B)

    

main()

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

Solution (Python):
A, B, K = map(int, input().split(' '))
if A < K:
    K = K - A
    A = 0
else:
    A = A - K
    K = 0
if B < K:
    K = K - B
    B = 0
else:
    B = B - K
    K = 0
print(A, B)

Solution (Python):
A,B,K = list(map(int,input().split()))
if K <= A:
  print('{} {}'.format(A-K,B))
if A < K <= A+B:
  print('{} {}'.format(0,A+B-K))
if A+B < K:
  print('{} {}'.format(0,0))

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