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