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-----
2 3 3

-----Sample Output-----
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.

Difficulty: introductory

Starter code:

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

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

import numpy as np

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

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

print(a, B)

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

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

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

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

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

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

print(a,b)

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

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

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

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

print(0,0)

a, b, k = map(int, input().split())
# A - Kを求める
remain = a - k
takahashi = remain 
# A - K < 0 なら Bの分も食べる
aoki = b
if remain < 0:
   takahashi = 0
   aoki = b + remain

print(str(takahashi) + " " + str(aoki if aoki > 0 else 0))

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

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

a, b, k = map(int, input().split())
print(max([0, a-k]), max(0, b+min([0, a-k])))

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

A,rem = max(A-K,0),max(K-A,0)
B = max(B-rem,0)

print(A,B)

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)

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

import math
from collections import Counter
from itertools import product

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

a,b,k = mi()

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

# 入力を受け取る
A,B,K = map(int,input().split())

# 条件分岐に応じて式をつくる
ret_A = A
ret_B = B

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

# 結果を出力する
print(ret_A, ret_B, sep=' ')

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


def __starting_point():
    slove()
__starting_point()

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( "0 " + str( a + b - k ) )
else:
    print( str( a - k ) + " " + str( b ) )

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

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

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)

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

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

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

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

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

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

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

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

a, b, k = map(int, input().split())
# A - Kを求める
takahashi = [0, a-k] 

# A - K < 0 なら Bの分も食べる
aoki = [0, b + min(takahashi)]

print("{takahashi} {aoki}".format(takahashi = max(takahashi), aoki = max(aoki)))

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

#!/usr/bin/env python3
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())

takahashi_list = [0, a-k] 
aoki_list = [0, b + min(takahashi_list)]

print(max(takahashi_list), max(aoki_list))

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

A, B, K = map(int, input().split())
def sum():
    nonlocal A, B, K
    if A>=K:
        return A-K, B
    else:
        a = K - A
        A = 0
        if B>=a:
            return A, B-a
        else:
            return A, 0
print(*sum())

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

if A-K <= 0:
    K2 = K-A
    A_ans = 0
    if B-K2 <= 0:
        B_ans = 0
    else:
        B_ans = B-K2
else:
    A_ans = A-K
    B_ans = B
    
print(A_ans, B_ans)      

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

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

print(A, B)

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

print(max(0, A-K), end=" ")

K = max(0, K-A)
print(max(0, B-K))


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)

n,m,k = map(int,input().split())
if n >= k:
    print(n-k,m)
else:
    if m - (k-n) < 0:
        m = 0
    else:
        m -= k - n
    print(0,m)

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 and k <= a + b:
    k = k - a
    a = 0
    b = b - k
elif a + b < k:
    a = 0
    b= 0
else:
    a = a - k

print(a , b)

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

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

total = a+b
if total <= k:
    ans = [0, 0]
else:
    if a <= k:
        k -= a
        a = 0
        b -= k
        ans = [a, b]
    else:
        a -= k
        ans = [a, b]

print(*ans)

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

if 0 <= K < A:
    A, B = A - K, B
elif A <= K < A + B:
    A, B  = 0, A + B - K
elif A + B <= K:
    A, B = 0, 0

print(A, B)

a, b, k = map(int, input().split())
n = min(a,k)
k -= n
print(a-n, max(0,b-k))

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

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

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

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

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

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

from typing import List


def answer(a: int, b: int, k: int) -> List[int]:
    if k <= a:
        a -= k
    elif k <= a + b:
        b -= k - a
        a = 0
    else:
        a = 0
        b = 0

    return [a, b]


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


def __starting_point():
    main()
__starting_point()

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

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

aa = max (a - k, 0)
rest = max(k - a, 0)
bb = max (b - rest, 0)
print(f'{aa} {bb}')

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

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

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

a, b, k = map(int, input().split())
# A - Kを求める
remain = a - k
takahashi = remain 
# A - K < 0 なら Bの分も食べる
aoki = b
if remain < 0:
   takahashi = 0
   aoki = b + remain

# print(str(takahashi) + " " + str(aoki if aoki > 0 else 0))
print("{takahashi} {aoki}".format(takahashi = takahashi, aoki = aoki if aoki > 0 else 0))

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 = (int(n) for n in input().split())
if k < a: print(a-k, b)
elif a <= k <= a + b: print("0", b - (k - a))
else:print("0","0")

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

#!/usr/bin/env python


def solve(A: int, B: int, K: int):
    if A >= K:
        return f"{A-K} {B}"
    elif A + B >= K:
        return f"0 {A+B-K}"
    else:
        return "0 0"


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


def __starting_point():
    main()

__starting_point()

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

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

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

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

print(A, B)

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

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

t = a - min(a,k)
k -= min(a,k)
q = b - min(k,b)

print(t,q)

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

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


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

elif A<K and K<A+B :
    print(0,A+B-K,sep=' ')

else: #K<A
    print(A-K,B,sep=' ')

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

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

a = input()
a = a.split()
k = int(a[2])
b = int(a[1])
a = int(a[0])
d = b

c = a - k
if c < 0:
    c = 0
if c == 0:
    d = b - k + a
if d < 0:
    d = 0

print(c,d)

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

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

print(a_ans,b_ans)

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

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

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

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

print((str(rem_a) + ' ' + str(rem_b)))


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

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

print(A, B)

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

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

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

a,b,k=(int(x) for x in input().split())
c=a

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

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