# frozen_string_literal: true

a, b, k = gets.split.map(&:to_i)

while k.positive?
  if a >= 1000000000000 && k >= 1000000000000
    a -= 1000000000000
    k -= 1000000000000
  elsif a >= 100000000000 && k >= 100000000000
    a -= 100000000000
    k -= 100000000000
  elsif a >= 10000000000 && k >= 10000000000
    a -= 10000000000
    k -= 10000000000
  elsif a >= 1000000000 && k >= 1000000000
    a -= 1000000000
    k -= 1000000000
  elsif a >= 100000000 && k >= 100000000
    a -= 100000000
    k -= 100000000
  elsif a >= 10000000 && k >= 10000000
    a -= 10000000
    k -= 10000000
  elsif a >= 1000000 && k >= 1000000
    a -= 1000000
    k -= 1000000
  elsif a >= 100000 && k >= 100000
    a -= 100000
    k -= 100000
  elsif a >= 10000 && k >= 10000
    a -= 10000
    k -= 10000
  elsif a >= 1000 && k >= 1000
    a -= 1000
    k -= 1000
  elsif a >= 100 && k >= 100
    a -= 100
    k -= 100
  elsif a >= 10 && k >= 10
    a -= 10
    k -= 10
  elsif a >= 1 && k >= 1
    a -= 1
    k -= 1

  elsif b >= 1000000000000 && k >= 1000000000000
    b -= 1000000000000
    k -= 1000000000000
  elsif b >= 100000000000 && k >= 100000000000
    b -= 100000000000
    k -= 100000000000
  elsif b >= 10000000000 && k >= 10000000000
    b -= 10000000000
    k -= 10000000000
  elsif b >= 1000000000 && k >= 1000000000
    b -= 1000000000
    k -= 1000000000
  elsif b >= 100000000 && k >= 100000000
    b -= 100000000
    k -= 100000000
  elsif b >= 10000000 && k >= 10000000
    b -= 10000000
    k -= 10000000
  elsif b >= 1000000 && k >= 1000000
    b -= 1000000
    k -= 1000000
  elsif b >= 100000 && k >= 100000
    b -= 100000
    k -= 100000
  elsif b >= 10000 && k >= 10000
    b -= 10000
    k -= 10000
  elsif b >= 1000 && k >= 1000
    b -= 1000
    k -= 1000
  elsif b >= 100 && k >= 100
    b -= 100
    k -= 100
  elsif b >= 10 && k >= 10
    b -= 10
    k -= 10
  elsif b >= 1 && k >= 1
    b -= 1
    k -= 1
  end

  break if k.positive? && a.zero? && b.zero?
end

puts "#{a} #{b}"
