a, b, x0, n = map(int, input().split()) if x0 % 2: ans = [0, n // 4] else: ans = [(n + 1) // 4, 0] print(*ans)