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