def eat(a, b)
  if a > 0
    return a - 1, b
  elsif b > 0
    return a, b - 1
  else
    return a, b
  end
end

A_cookie, B_cookie, times = gets.split(' ').map(&:to_i)

times.times do
  A_cookie, B_cookie = eat(A_cookie, B_cookie)
end

print A_cookie, " ", B_cookie