A, B, X, N = map(int, input().split()) print(X % 2 * N // 2, (X + 1) % 2 * N // 2)