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