a, b, x0, N = map(int, input().split()) p0 = x0 % 2 takahashi = (N // 2) if p0 else 0 aoki = (N // 2) if not p0 else 0 print(takahashi, aoki)