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


def solve(A: int, B: int, K: int):
    if A >= K:
        print("%d %d" % (A-K, B))
    elif A < K:
        print("%d %d" % (0, max(0, B-(K-A))))
    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 K > A:
    B = max(B - (K - A), 0)
    A = 0
else:
    A = A - K

print(A, B)

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)
else:
    print(0,0)

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

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

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

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

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

c = a - k


if c >= 0:
  print(c, b)
else:
  d = b + c
  if d >= 0:
    print(0, d)
  else:
    print(0, 0)

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

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

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

Solution (Python):

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

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

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

ans_a = 0
ans_b = b
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))

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

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

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

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

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

Solution (Python):
a,b,k = map(int,input().split())
a, b = max(0,a-k), max(0,b-max(k-a,0))
print("{} {}".format(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 = [int(i) for i 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())
tmp = a-k
print("{} {}".format(max(tmp, 0), max(b+min(tmp, 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)
else:
    print(0,0)

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

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

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

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

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

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

print(a,b)

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

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

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

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

print(A, B)

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

main()

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

tabeta_a=min(a,k)
tabeta_b=min(b,k-tabeta_a)
print(a-tabeta_a,b-tabeta_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,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 <= A+B:
    print (0, A+B-K)
else:
    print (0, 0)

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

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

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

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

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

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

Solution (Python):
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('{} {}' .format(A, B))

Solution (Python):

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

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

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

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

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

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

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

else:
    print(a-k, b)

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

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

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

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

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

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

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

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

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

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

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

if k <= a:
	a -= k

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

print(a, b)

Solution (Python):
A,B,K = map(int,input().split())
 
A_= max(0,A-K)
K = max(0,K-A)
B_ =  max(0,B-K)
print("{} {}".format(A_,B_))

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

A_= max(0,A-K)
K = max(0,K-A)
B_ =  max(0,B-K)
print("{} {}".format(A_,B_))

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

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

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

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

Solution (Python):
args=input().split()

A=int(args[0])
B=int(args[1])
K=int(args[2])

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


print(A,B)

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

    B = max(0, B-max(K-A, 0))
    A = max(0, A-K)
    print("{} {}".format(A, B))

if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
a, b, k = input().split()
A = int(a)
B = int(b)
K = int(k)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

if a > k:
    a_ans = a - k
    b_ans = b
elif b > k-a:
    b_ans = b-(k-a)

print(a_ans, b_ans)

Solution (Python):
import sys
from io import StringIO
import unittest

def resolve():
    inp = input().split()
    a = int(inp[0])
    b = int(inp[1])
    k = int(inp[2])

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

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

    print(str(a) + ' ' + str(b))

if __name__ == "__main__":
    resolve()

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

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

if K <= A:
    a = A-K
    b = B
elif K <= A+B:
    b = (A + B) - K
print(a,end=" ")
print(b)

Solution (Python):
STRI = input()
DICT = STRI.split()
A=int(DICT[0])
B=int(DICT[1])
K=int(DICT[2])

cA = A
cB = B

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

print(cA,cB)

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)
elif a+b < k:
	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):




def main():
    A, B, K = map(int, input().split())
    a = max(A - K, 0)
    K -= A - a
    b = max(B - K, 0)
    print(*[a, b])


if __name__ == "__main__":
    main()

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

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

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

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

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

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

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

x = max(0, a-k)
y = max(0, b-max(0, k-a))
print(x, y)

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

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

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

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

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

print(A,B)

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

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

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

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

Solution (Python):
A, B, K = map(int, input().split())
a = min(A, K)
b = min(B, K-a)
print(A-a, B-b)

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

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

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

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

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

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

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

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

print(a, b)

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

Solution (Python):
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):
    taka = 0
    aoki = 0
else:
    
    taka = 0
    b = K - A
    aoki = B - b
print(str(taka)+" "+str(aoki))

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

Solution (Python):
import sys
row = sys.stdin.readline
 
def read_ints(row):
    return list(map(int, row().split()))
  
A ,B ,K = read_ints(row)
 
print(max(0, A - K),max(0, B-max(0,(K-A))))

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

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

Solution (Python):
a,b,k = list(map(int,input().split(' ')))
"""takahashi has a
   aoki has b
   loop k

for _ in range(k):
  if a >= 1:
    a -= 1
  elif b >= 1:
    b -= 1
  elif a == 0 and b == 0:
    break
"""
if a <= k:
  k -= a
  a = 0
else:
  a -= k
  k = 0



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

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

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

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

print(lasttakahashi, lastaoki)

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

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

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

Solution (Python):
A,B,K = [int(i) for i in input().rstrip().split(' ')]
if K >= A:
    A,K = 0,K-A
    B -= K
else:
    A -= K
if B < 0:
    B = 0
print(A,B)

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

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

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

Solution (Python):

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

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

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

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

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

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


def main():
    a, b, k = map(int, input().split())
    x = min(a, k)
    k -= x
    a -= x
    x = min(b, k)
    k -= x
    b -= x
    print(a, b)
    
main()

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 k < a:
    a -= k
else:
    b = max({0, b - (k - a)})
    a = 0

print(str(a) + " " + str(b))

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


if A >= K:
  ans = [A-K,B]
elif (A+B) >= K and A < K:
  ans = [0,B-(K-A)]
else:
  ans = [0,0]

print(*ans)

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

import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline






















def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))

def main():
	A,B,K = inputMap()

	if A > 0:
		if A <= K:
			K = K-A
			A = 0
			
		else:
			print("{} {}".format(A-K, B))
			sys.exit()

	
	if B > 0:
		if B <= K:
			print("{} {}".format(0, 0))
			sys.exit()
		else:
			
			B = B-K
			print("{} {}".format(A, B))
			sys.exit()

	print("{} {}".format(A, B))




if __name__ == "__main__":
	main()

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

m = min(a,k)
ans_a = a - m
ans_b = b- min(b, k-m)

print(ans_a,ans_b)

Solution (Python):
a,b,k=map(int,input().split())
ansT=0
ansA=0
ans=0

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

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


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

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

A = a - k
B = b + (a - k)

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

Solution (Python):

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

if A>K:
	print('{} {}'.format(A-K,B))
else:
	if K-A<B:
		print('{} {}'.format(0,B-(K-A)))
	else:
		print('{} {}'.format(0,0))

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

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

print(t_num,a_num)

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

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

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

elif (a + b) > k:
    print('0 {}'.format(a+b-k))

elif (a + b) <= k:
    print('0 0')

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

Solution (Python):



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

if a <= k : 
    ansa = 0 
    ansb = max(0,b-(k-a))
else:
    ansa = a-k 
    ansb = b 

print("%d %d" % (ansa,ansb))

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

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

Solution (Python):

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

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

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

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

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

Solution (Python):
import sys

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

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

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

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

if B >= 1:
    tmp = B - K
    if tmp <= 0:
        B = 0
        K = abs(tmp)
        
    else:
        K = 0
        B = tmp
        
print(A,B)

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines

a, b, k = [int(line) for line in readline().split()]

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

Solution (Python):
A, B, K = list(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)

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

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

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

if a > k:
    a -= k
    print(str(a) + " " + str(b))
else:
    left = k - a
    b -= left
    if b < 0:
        b = 0
    print(str(0) + " " + str(b))

Solution (Python):
import sys

stdin = sys.stdin

ns = lambda : stdin.readline().rstrip()
ni = lambda : int(ns())
na = lambda : list(map(int, stdin.readline().split()))
sys.setrecursionlimit(10 ** 7)

def main():
    a, b, k = na()

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

if __name__ == '__main__':
    main()

Solution (Python):
A,B,K=map(int, input().split())
count=0
if (A-K)<0:
    B=B+A-K
    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:
    ans_a = a - k
    ans_b = b

if a < k and a + b >= k:
    ans_a = 0
    ans_b = a + b - k

if a < k and a + b < k:
    ans_a = 0
    ans_b = 0

print(ans_a, ans_b)

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

print(max(a - k, 0), max(b + min(a - k, 0), 0))

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

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

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

if quant - K <= 0:
    print('0 0')
else:
    rnt = A - K  
    a = max(rnt, 0)
    b = min(B + rnt, B)
    print(str(a) + ' ' + str(b))

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

Solution (Python):
s=list(map(int,input().split()))
if s[0]<=s[2]:
  s[2]-=s[0]
  s[0]=0
else:
  s[0]-=s[2]
  s[2]=0
if s[1]<=s[2]:
  s[1]=0
else:
  s[1]-=s[2]
print(*[s[0],s[1]])

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

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

t_zan = a - k
if t_zan < 0:
  aoki_zan = b + t_zan
  t_zan = 0
else:
  aoki_zan = b

if aoki_zan < 0:
  aoki_zan = 0

print(str(t_zan) + ' ' + str(aoki_zan))

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

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

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

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

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

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

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

if (a - k) < 0: 
    res_a = 0
    if (b + a - k) < 0:
        res_b = 0
    else:
        res_b = b+a-k
else:
    res_b = b
    res_a = a - k
print(str(res_a) + ' ' +str(res_b))

Solution (Python):
def pin(type=int):
    return map(type,input().split())
A,B,K =pin()
if (K<A):
    print(A-K,B)
else:
    g=A+B-K
    if (g<0):
        print(0,0)
    else:
        print(0,g)

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

Solution (Python):

def main():
    a, b, k = map(int, input().split())
    result_a = 0
    result_b = 0
    if k >= a:
        result_a = 0
        if (k - a) >= b:
            result_b = 0
        else:
            result_b = b - (k - a)
    else:
        result_a = a - k
        result_b = b

    print(str(result_a) + " " + str(result_b))


if __name__ == "__main__":
    main()