A, B, X0, N = gets.split.map(&:to_i) if X0.even? puts "%d %d" % [0, N / 2] else puts "%d %d" % [N / 2, 0] end