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