a, b, x, n = map(int, input().split()) if x % 2 == 1: takahashi = n // 2 aoki = 0 else: takahashi = 0 aoki = n // 2 print(takahashi, aoki)