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