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():
    input = sys.stdin.readline
    mod = 10 ** 9 + 7
    a, b, k = list(map(int, input().rstrip('\n').split()))
    t = min(a, k)
    a -= t
    k -= t
    t = min(b, k)
    b -= t
    print(a, b)


if __name__ == '__main__':
    solve()

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

print(odd_a, odd_b)

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

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

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

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

Solution (Python):
s = input().split()
a = int(s[0])
b = int(s[1])
k = int(s[2])

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:
    out1 = 0
    out2 = B - (K - A)
    out2 = max(0, out2)
else:
    out1 = A - K
    out2 = B

print(str(out1) + ' ' + str(out2))

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

x = max(0,A - K)
y = B

if x == 0:
  y = max(0,B - (K - A))

print(x,y)

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

if k < a:
  a = a-k

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

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

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

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

a = max(A-K, 0)
K -= A - a
b = max(B-K, 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):
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):
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:
    a -= k


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

else:
    b = b - (k - a)
    a = 0
print(str(a)+' '+str(b))

Solution (Python):
n1, n2, n3 = [int(i) for i in input().split()]

if n1 >= n3:
    n1 -= n3
elif n1 + n2 >= n3:
    n2 -= (n3 - n1)
    n1 = 0
else:
    n1 = 0
    n2 = 0

print(str(n1) + " " + str(n2))

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):
s = input()
a, b, k = s.split()
a, b, k = int(a), int(b), int(k)


aa = max(a-k, 0)
bb = max(b-max(k-a, 0), 0)
print(aa, bb)

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

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

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

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

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

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

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

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

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

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

Solution (Python):

stra, strb, strk = input().split()
a = int(stra)
b = int(strb)
k = int(strk)
if a >= k :
  a = a - k
  k = 0
else:
  k = k - a
  a = 0


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

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

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

    '''
    for i in range(K):
        if 1 <= A:
            A-=1
        elif 1 <= B:
            B-=1
    '''

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

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

if __name__ == "__main__":
    resolve()

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









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

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 resolve():
    A, B, K = map(int, input().split())
    A_res = A - K
    if A_res >= 0:
        print(A_res, B)
        return
    
    B_res = B + A_res
    if B_res >= 0:
        print(0, B_res)
        return 

    print(0, 0)


if __name__ == "__main__":
    resolve()

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

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

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

print(a, b)

Solution (Python):
import sys

def stdin_parse_int():
    a = list(map(int,input().split()))
    return a

list = stdin_parse_int()
A = list[0]
B = list[1]
K = list[2]

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

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

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

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

print(a,b)

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

na = max(0, a-k)
nb = max(0, b-(k-(a-na)))
print na, nb

Solution (Python):
import sys

lines = sys.stdin.readlines()

a, b, k = map(int, lines[0].split())

if a <= k:
    k = k - a
    a = 0
    if b <= k:
        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())
tmp = A
A -= K
K -= tmp
if A < 0:
  A = 0
if K < 0:
  K = 0
B -= K
if B < 0:
  B = 0
print(str(A) + " " + str(B))

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

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

Solution (Python):
takahashi, aoki, n = [int(i) for i in input().split()]
rtaka = takahashi-n
raoki = aoki if rtaka >= 0 else aoki+rtaka
print(str(max(rtaka, 0)), str(max(raoki, 0)))

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

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

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

Solution (Python):

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

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

print(a,b)

Solution (Python):

 
import math
import itertools
import sys
import copy
 





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

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

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

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):
    result1 = 0
    x = K - A
    B = B - x
    result2 = B if B >= 0 else 0
else:
    result1 = A - K
    result2 = B

print('{} {}'.format(result1, result2))

Solution (Python):





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

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

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

Solution (Python):

inputA,inputB,inputC = map(int, input().split())

if inputC >= inputA:
    if inputB > inputC-inputA:
        print(0,inputB -(inputC-inputA))
    else:
        print(0,0)
else:
    print(inputA-inputC,inputB)

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

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

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

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

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

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=input().split(" ")
A=int(A)
B=int(B)
K=int(K)

if A-K>=0:
    ans1=A-K
    ans2=B
else:
    if B-(K-A)<=0:
        ans1=0
        ans2=0
    else:
        ans1=0
        ans2=B-(K-A)

print(ans1,ans2)

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

Solution (Python):

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

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

A -= K
if(A < 0):
    B -= abs(A)
    A = 0
    if(B < 0):
        B = 0

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

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

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

if s>=k:
  ans_s = s-k
  ans_t = t
else:
  ans_s, k = 0, k-s
  if k<t:
    ans_t = t-k
  else:
    ans_t = 0
print(ans_s, ans_t)

Solution (Python):
a,b,c = map(int,input().split())
taka=a-c
aoki=b
if taka<0:
  taka=0
  aoki=b+a-c
  if aoki < 0:
    aoki=0

print(taka,aoki)

Solution (Python):
a = input().rstrip().split(' ')
b=[int(i) for i in a]
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)

Solution (Python):


from collections import defaultdict


def getlist():
	return list(map(int, input().split()))


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

	


if __name__ == '__main__':
	main()

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

n_takahashi = a
n_aoki = b

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

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

print('{} {}'.format(n_takahashi, n_aoki))

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

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

Solution (Python):
def solve(string):
    a, b, k = map(int, string.split())
    return "{} {}".format(max(0, a - k), max(0, min(b, a + b - k)))


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))

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

Solution (Python):

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


if __name__ == "__main__":
    main()

Solution (Python):
A,B,K = map(float,raw_input().split())
ans_A=0
ans_B=0
if A <= K:
  ans_A=0
  if K-A < B:
    ans_B = int(B-(K-A))
    print ans_A,ans_B
  else:
    print 0,0
else:
  ans_A=A-K
  print int(ans_A),int(B)

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

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

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

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

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

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

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

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

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

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())
x = max(a-k, 0)
y = max(min(b, (a+b-k)), 0)
print(x, y)

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

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

else:
    print('0 0')

Solution (Python):
a,b,k = input().split()
a = int(a)
b = int(b)
k = int(k)
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 = 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())

a = a - k

if a < 0:
    b = 0 if b+a <0 else  b+a
    a=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):


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


if __name__ == "__main__":
    resolve()

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

if k != 0:
    diva = a / k
    if diva >= 1:
        a -= k
    else:
        k -= a
        a = 0
        b -= k
        if b < 0:
            b = 0
print("{} {}".format(a, b))

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

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

if K > A:
    K = K - A
    A = 0
    if K >= B:
        B = 0
        print(A, end=" ")
        print(B)
        exit(0)
    if B > K:
        B = B - K
        print(A, end=" ")
        print(B)
        exit(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 = list(map(int, input().split()))

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

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

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

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

print(A, B)

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

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

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

def eating(A,B,K):
  if A+B <= K:
    return 0, 0
  elif A > K:
    return A-K, B
  elif A <= K:
    return 0, B-(K-A)

out1, out2 = eating(A,B,K)
print(out1,out2)

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

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

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

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())
ans1 = max(0, a - k)
k = k - (a - ans1)
ans2 = max(0, b - k)
print(ans1, ans2)

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

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

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

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

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

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

Solution (Python):
from sys import stdin
a,b,k=[int(x) for x in stdin.readline().rstrip().split()]
if b+a-k<0:
    print(0,0)
elif a-k<0:
    print(0,b+a-k)
else:
    print(a-k,b)

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

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

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

Solution (Python):
if __name__=="__main__":
    a,b,k=input().split()
    a,b,k=int(a),int(b),int(k)
    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,b = max(0,a-k) , max(b-max(k-a,0),0)
print(a,b)

Solution (Python):
a,b,k=map(int,input().split())
m = a-k
if(0<=m):
  print(m,b)
else:
  l = 0-m
  n = b-l
  if(0<=n):
    print(0,n)
  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('{} {}'.format(0,b+a-k))
else:
    print('0 0')

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

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

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

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

Solution (Python):
stdin = input().split()
a = int(stdin[0]) 
b = int(stdin[1]) 
k = int(stdin[2]) 

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

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

ma = min(a, c)
a = a-ma
c = c-ma
ma = min(c, b)
b = b - ma
print(str(a)+" "+str(b))

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

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

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

Solution (Python):
variables_list = input()
variables_list =  list(map(int, variables_list.split(" ")))


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


print(str(func(variables_list)[0]) + " " + str(func(variables_list)[1]))

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

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


resultA,resultB = eat_cookie(A,B,K)
print(resultA,resultB)

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

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

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

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

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

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

Q = K - A
q = A - K
if Q < 0 :
  print (q,B)
if Q >= 0 :
  W = B - Q
  if W >= 0:
    print ("0",W)
  if W< 0 :
    print("0 0")

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

if i[0]<i[2]:
  
  i[1]=i[1]-(i[2]-i[0])
  i[0]=0
  if i[1]<0:
    i[1]=0
else:
  i[0]-=i[2]

print(i[0],i[1])

Solution (Python):
import math
import heapq
import sys
from collections import Counter
import datetime
from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN





x=list(map(int, input().split()))  

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

if A+B-K<=0:
    print('0 0')
elif A-K<=0:
    print('0 {0}'.format(B-(K-A)))
else:
    print('{0} {1}'.format(A-K,B))

Solution (Python):



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

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

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

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

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

Solution (Python):
a, b, k = (int(i) for i in input().split())
takahashi = a - k
aoki = b + takahashi if takahashi < 0 else b
print("{} {}".format(max(takahashi, 0), max(aoki, 0)))

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

taka = max(a-k, 0)
aoki = max(0, b - max(k-a, 0))
print(taka, aoki)

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

Solution (Python):
def main():
    a, b, k = (int(s) for s in input().split())
    if a >= k:
        print(a - k, b)
        return
    else:
        a, k = 0, k - a
        if b >= k:
            print(a, b - k)
            return
        else:
            print(0, 0)
            return

if __name__ == "__main__":
    main()

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

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

print(a, b)

Solution (Python):

"""
Created on Sat Jan  4 16:34:06 2020

@author: masat
"""

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

A_last = 0
B_last = 0

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

print("{} {}".format(A_last, B_last))

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

if K <= A:
  print("{} {}".format(A - K, B))
elif K <= A + B:
  print("0 {}".format(B - (K - A)))
else:
  print("0 0")

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

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

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

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

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

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

Solution (Python):


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

tcookie = 0
acookie = 0


if A > K :
    tcookie = A - K 
    acookie = B


if A <= K : 
    tcookie = 0
    
    if ( K - A ) < B:
        acookie = B - (K - A) 
    
    if ( K - A ) >= B:
        acookie = 0

print(str(tcookie) + " " +  str(acookie))

Solution (Python):
import sys
input = sys.stdin.readline().rstrip
A, B ,K = map(int, input().split())
a = K-A
if a < 0:
    print(-a, B)
elif B-a > 0:
    print(0, B-a)
else:
    print(0, 0)

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

if a < k:
    
    ra = 0
    k = k-a
    
    if b < k:
        rb = 0
    else:
        rb = b-k
else:
    ra = a-k
    rb = b

print(ra,rb)

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

takahashi = max(0,t-k)
k = max(0,k-t)
aoki = max(0,a-k)
print(takahashi,aoki)

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

Solution (Python):
import sys
def input():
    return sys.stdin.readline()[:-1]
a,b,k=map(int,input().split())
tmp=0
if a<=k:
    print(0)
    tmp=k-a
else:
    print(a-k)

if b<=tmp:
    print(0)
else:
    print(b-tmp)

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

Solution (Python):
list = list(map(int,input().split()))
A = list[0]
B = list[1]
K = list[2]

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

print(A, B)

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

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

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

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

Solution (Python):

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

import sys

input = list(map(float, input().split()))

takahashi = input[0]
aoki = input[1]
num = input[2]

a = takahashi - num
b = 0
if a < 0:
  b = aoki + a
  a = 0
  if b < 0:
    b = 0
else:
  b = aoki

print("{0} {1}".format(int(a),int(b)))

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

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

Solution (Python):
import sys
input=sys.stdin.readline
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 = [int(i) for i in input().split()]
if a>=k:
    print("{} {}".format(a-k,b))
elif a+b <= k:
    print("{} {}".format(0,0))
else:
    print("{} {}".format(0,b-k+a))

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

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

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

    print(a, b)

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

if s + t <=  n:
  print('0 0')
elif s >= n:
  print(str(s-n) + ' ' + str(t))
else:
  print('0 ' + str(s+t-n))

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

if a+b <= k:
    A = 0
    B = 0
elif a < k:
    A = 0
    B = b + a - k
elif k <= a:
    A = a - k
    B = b
print(str(A) + " " + str(B))

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




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

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

"""
ここで、まずはAとKの比較を行って、Aの方が大きければその場で試行は終了
し、Kの方が大きければ、A=0となり、その差|A-K|は残りのBから引くものになる。
"""
if A >= K:
  A -= K
  print(A, end=" ")
  print(B)
else:
  K -= A
  A = 0
  B -= K
  if B < 0:
    B = 0
  print(A, end=" ")
  print(B)

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