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