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