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.



Sample input:
2 3 3


Sample output:
0 2

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

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

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


print(a, b)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a2,b2,k2=input().split()
a2=int(a2)
b2=int(b2)
k2=int(k2)
if a2-k2 >0:
    print(a2-k2,b2)
elif a2+b2-k2>0:
    print("0",a2+b2-k2)
else:
    print("0 0")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

last_A = max(A - K, 0)
last_B = max(B - max(K - A, 0), 0)
out = "{} {}".format(last_A, last_B)

print(out)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(a, b)

Submission status: Accepted

Solution code:
def minas2zero(n):
    if(n<=0):return 0
    return n
a, b, k = map(int, input().split())
a1, a2 = 0, 0
if(k >= a):
    a1 = 0
    a2 = minas2zero(b - (k-a))
else:
    a1 = a-k
    a2 = b

print(a1, a2)

Submission status: Accepted

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

if K < A+B:
    ansA = max(A-K,0)
    ansB = min(B+A-K,B)
    print(ansA,ansB)
else:
    print(0,0)

Submission status: Accepted

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

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

print (A,B)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(max(0, a), max(0, b))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(a, b)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,k=(int(x) for x in input().split())
x = a-k
if x>=0:
  print(x,b)
else:
  y=b+x
  if y>=0:
    print(0,y)
  else:
    print(0,0)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(' '.join([str(a), str(b)]))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
from pprint import pprint

def solve(a, b, k):
    delta = a - k
    if delta < 0:
        b = b + delta
    print(max(0, delta), max(0, b))


if __name__ == '__main__':
    a, b, k = map(int, sys.stdin.readline().strip().split(" "))
    solve(a, b, k)

Submission status: Accepted

Solution code:
a, b, k = map(int,input().split())
t = min(a,k)
a -= t
k -= t
u = min(b,k)
b-=u
print(a,b)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10000000)
INF = 1<<32


def solve(A: int, B: int, K: int):
    t = max(0, A-K)
    a = B
    if A-K > 0:
        a = B
    else:
        a = max(0, a- (K-A))

    print(t, 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))  # type: int
    B = int(next(tokens))  # type: int
    K = int(next(tokens))  # type: int
    solve(A, B, K)

if __name__ == '__main__':
    main()

Submission status: Accepted

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


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())

if a >= c:
    a = a - c
else:
    c = c - a
    a = 0
    b = b - c
    if b < 0:
        b = 0

print(a, b)

Submission status: Accepted

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

A, B, K = map(int, input().split())
Ar = max(0, A-K)
K = max(0, K-A)
Br = max(0, B-K)

print(Ar,Br)

# S, T = input().split()
# print(T+S)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a,b,k=map(int,input().split())
if a>k:
  t=a-k
  s=b
else:
  t=0
  s=max(b-k+a,0)
print(str(t)+' '+str(s))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b, k = map(int, input().split())
a_res = 0
b_res = b
if a - k > 0:
    a_res = a - k
else:
    k_temp = k - a
    b_res = b - k_temp
    if b_res < 0:
        b_res = 0
print(str(a_res) + ' ' + str(b_res))

Submission status: Accepted

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

Submission status: Accepted

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

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

print(A, max(B, 0))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():
    A, B, K = list(map(int, input().split()))
    
    if A>=K:
        print(A-K, B)
    elif B >= K - A:
        print(0, B - (K -A))
    else:
        print(0, 0)

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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])

Submission status: Accepted

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


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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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


def solve():
    if ((A - K) > 0):
        return [A - K, B]
    ans = B - (K - A)
    return [0,  max(0, ans)]


print(*solve())

Submission status: Accepted

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

eatenA = min(a , k)
ans1 = a - eatenA
eatenB = max(k - a, 0)
ans2 = b -  eatenB

if ans2 < 0:
    ans2 = 0

print(ans1, ans2 )

Submission status: Accepted

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

ans = [0, 0]

if k > a:
    ans[1] = a + b - k
    if ans[1] < 0:
        ans[1] = 0
else:
    ans[0] = a - k
    ans[1] = b

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#B
a, b, k = list(map(int,input().split()))
s = a
t = b
if k >= 0:
    if  a > 0:
        if k > a:
            a = 0
            k = k -s
        else:
            a = a-k
            k = 0
    if b > 0:
        if k >= 0:
            if k > b:
                b = 0
            else:
                b = b-k
print(a,b)

Submission status: Accepted

Solution code:
# B - Greedy Takahashi
A,B,K = map(int, input().split())

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

if ans2 < 0:
    ans2 = 0
else:
    pass

print(ans1,ans2)

Submission status: Accepted

Solution code:
a,b,k=map(int, input().split())
ans = a-k
if ans >= 0:
    box=[ans,b]
    print(*box)
else:
  if a+b-k >0:
    box=[0,a+b-k]
    print(*box)
  else:
    box=[0,0]
    print(*box)

Submission status: Accepted

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

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

Submission status: Accepted

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

if k>= a+b:
    print('0 0')

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

Submission status: Accepted

Solution code:
def main():
    a, b, k = [int(i) for i in input().split()]
    after_a = max(a - k, 0)
    k -= (a - after_a)
    b -= k
    b = max(b, 0)
    print(after_a, b)
 
 
if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(A: int, B: int, K: int):
    if A>=K:
        print(A-K,B)
    else:
        print(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))  # type: int
    B = int(next(tokens))  # type: int
    K = int(next(tokens))  # type: int
    solve(A, B, K)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
mystr = str(input())
mystrs = mystr.split(' ')
A = int(mystrs[0])
B = int(mystrs[1])
K = int(mystrs[2])
if K <= A:
  ret = "%d %d" % (A - K, B)
else:
  if K - A <= B:
    ret = "0 %d" % (B - (K - A))
  else:
    ret = "0 0"
print(ret)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
tmp = input().split()
A = int(tmp[0])
B = int(tmp[1])
K = int(tmp[2])

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

else:
    A = A - K
    K = 0

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

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

Submission status: Accepted

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

Submission status: Accepted

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

print(a,b)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(a, b)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input().split()
a=int(s[0])
b=int(s[1])
k=int(s[2])
if a>=k:
    print(str(a-k)+" "+str(b))
else:
    if a+b>=k:
        print("0 "+str(b+a-k))
    else:
        print("0 0")

Submission status: Accepted

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

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

Submission status: Accepted

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

if min(a,k) == a:
    taka = 0
    if min(b, k-a) == b:
        aoki = 0
        print(taka, aoki)
    else:
        aoki = b - (k-a)
        print(taka, aoki)
else:
    taka = a - k
    aoki = b
    print(taka, aoki)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
a, b, k = [int(x) for x in input().strip().split()]
if k <= a:
    print(a - k, b)
else:
    print(0, max(0, b - (k - a)))

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
A,B,K=map(int,input().split())

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

Submission status: Accepted

Solution code:
from collections import defaultdict, deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys
import random
import itertools
import math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt


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


def LF(): return list(map(float, input().split()))


def LI_(): return list(map(lambda x: int(x)-1, input().split()))


def II(): return int(input())


def IF(): return float(input())


def LS(): return list(map(list, input().split()))


def S(): return list(input().rstrip())


def IR(n): return [II() for _ in range(n)]


def LIR(n): return [LI() for _ in range(n)]


def FR(n): return [IF() for _ in range(n)]


def LFR(n): return [LI() for _ in range(n)]


def LIR_(n): return [LI_() for _ in range(n)]


def SR(n): return [S() for _ in range(n)]


def LSR(n): return [LS() for _ in range(n)]


def gcd(x, y):
    if y == 0:
        return x
    return gcd(y, x % y)


def my_index_multi(l, x):
    return [i for i, _x in enumerate(l) if _x == x]


def sosu(x):
    for i in range(2, int(sqrt(x)+1)):
        if x % i == 0:
            return False
    return True


mod = 1000000007
inf = float('INF')


def A():
    S, T= input().split()
    
    
    print(T+S)

    
    return

# B


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

   
    return

# C


def true():
    S = input()
    S = S[:-1]

    tmp = 0
    for x in range(1 << (len(S)-1)):
        func = S[-1]
        for i in range(len(S)-1):
            if(x & (1 << i)):
                tmp += int(func)
                func = S[-2-i]
            else:
                func = S[-2-i]+func
        tmp += int(func)
    print(tmp)

    return


def flagcounter(x):
    if (x == 0):
        return 0
    return flagcounter(x >> 1)+(x & 1)


def C():
    W, H, x, y = LI()

    if (W/2 == x and H/2 == y):
        print(W*H/2, 1)
    else:
        print(W*H/2, 0)

    return


# D


def D():

    N, K = LI()
    A = LI()
    MAX = sum(A)
    if MAX < K:
        print(0)
        return
    Temp = MAX
    ans = 1
    for i in range(N):
        Temp = Temp-A[i]
        if (Temp >= K):
            ans += 1
        else:
            T = Temp+A[i]
            break
    Temp = T
    ckeep = N
    for k in range(N):
        c = N-1
        i -= 1
        Temp = T

        for j in range(N):
            Temp = Temp-A[c]
            if (Temp >= K ):
                ans += 1
            
            elif(c < ckeep and i>=0):
                ans += i
                ckeep = c
                break
            else:
                ckeep = c
                break
            c -= 1
        if i < 0:
            break
        T = T+A[i]
    print(ans)

    return

# E


def E():
    N, K = LI()
    A = LI()
    F = LI()
    A.sort(reverse=True)
    F.sort()
    cost = []
    for i in range(len(N)):
        cost.append(A[i]*F[i])

    a = F[cost.index(max(cost))]

    return

# F


def F():
    N, M = LI()

    value = [0] * M
    power = [0] * M
    for i in range(M):
        a, b = LI()
        value[i] = a
        c = LI()
        L = ['0'] * N
        for k in c:
            L[k - 1] = '1'
        bint = ''.join(L)
        power[i] = int(bint, 2)
    bint = ''.join(list(['1'] * N))
    dp = [inf] * (int(bint, 2)+1)
    t = 0
    cost = 0

    dp[0] = 0
    for s in range(int(bint, 2) + 1):
        for i in range(M):
            t = s | power[i]
            cost = dp[s] + value[i]
            dp[t] = min(dp[t], cost)
    print(-1) if(dp[-1] == inf) else print(dp[-1])

    return

    # you can write to stdout for debugging purposes, e.g.
# print("this is a debug message")


def solution(S):
    # write your code in Python 3.6
    N = len(S)

    pass


# Solve
if __name__ == '__main__':

    B()

Submission status: Accepted

Solution code:
A, B, K = list(map(int, input().split()))
ansA = A
ansB = B
a = A - K
if a > 0:
    ansA = A - K
else:
    ansA = 0
    ansB = B - (K - A)
    if ansB < 0:
        ansB = 0


print(ansA, end="")
print(" ", end="")
print(ansB)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A,B,K = (int(i) for i in input().split())
if A >= K:
    x = A-K
    y = B
elif B > K-A:
    x = 0
    y = B -(K-A)
else:
    x,y = 0,0

print(x,y)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
coo=list(map(int, input().split()))
tcoo=coo[0]
acoo=coo[1]
k=coo[2]
if k >= tcoo:
    k-=tcoo
    tcoo=0
    if k >= acoo:
        acoo=0
    else:
        acoo-=k
else:
    tcoo-=k
print(str(tcoo)+" "+str(acoo))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

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)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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

if b <= k:
    k -= b

print(a, b)

Submission status: Accepted

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

print(A, B)

Submission status: Accepted

Solution code:
t,a,c = map(int,input().split())

t1 = t-c
a1 = a+min(0,(t-c))

print(max(0,t1),max(0,a1))

Submission status: Accepted

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

a = A - K

if a >= 0:
    print(a , B)
else:
    if B + a >= 0:
        print(0 , B + a)
    else:
        print(0 , 0)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
[A, B, K] = list(map(int, input().split()))
if A > K :
  takahashi = A - K
  aoki = B
elif A <= K < A + B:
  takahashi = 0
  #高橋くんが食べたクッキーはA枚
  #残りの試行回数はK - A回
  aoki = B - (K - A)
else:
  takahashi = 0
  aoki = 0
print(takahashi, aoki)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def run(a, b, k):
    ans1 = a - k
    ans2 = b
    if ans1 < 0:
        ans2 = b + ans1
        ans1 = 0
    if ans2 < 0:
        ans2 = 0
    return ans1, ans2


def main():
    a, b, k = map(int, input().split())
    ans = run(a, b, k)
    print(ans[0], ans[1])


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
inp = input()

A = int(inp.split(" ")[0])
B = int(inp.split(" ")[1])
K = int(inp.split(" ")[2])

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

print( A,B )

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(max(am1,0), am2)

Submission status: Accepted

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


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

print(A, B)

Submission status: Accepted

Solution code:
A, B, K = map(int, 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)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
a,b,k=map(int,input().split())
if a>k:
    print(max(0,a-k),b)
else:
    print(max(0,a-k),max(0,a+b-k))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(a, b)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

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

# for i in range(K):
#     if A > 0:
#         A -= 1
#     elif B > 0:
#         B -= 1

if A + B <= K:
    A = 0
    B = 0

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

elif A > K:
    A = A - K 

print(A,B)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B, K = [int(i) for i in input().split()]
tak = max(0, A-K)
aok = max(min(A+B-K, B), 0)
print(tak, aok)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
t, a, k = [int(x) for x in input().split()]
k2 = max(k - t, 0)
t = max(t - k, 0)
a = max(a - k2, 0)
print(t, a)

Submission status: Accepted

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

A1 = max(0,A-K)
if A1>0:
    B1 = B
else:
    B1 = max(0,A+B-K)

print(A1,B1)

Submission status: Accepted

Solution code:
a,b,k = map(int,input().split(' '))
mini = min(a,k)
a-=mini
k-=mini
mini2 = min(k,b)
b-=mini2
print(a,b)

Submission status: Accepted

Solution code:
# AtCoder Beginner Contest 149 : B (2019/12/29)
A, B, K = map(int, input().split())
if A >= K:
    A = A - K
elif A < K:
    if B >= K-A:
        B = B -(K-A)
    else:
        B = 0
    A = 0
print(A, B)