main = put =<< sol <$> get
get = fmap read . words <$> getLine
put = putStrLn . unwords . fmap show
sol [a,b,k] 
  | k==0    = [a,b]
  | a>0     = sol [a-ak,b,k-ak]
  | b>0     = sol [a,b-bk,k-bk]
  where
  ak = min a k
  bk = min b k