a,b,x,N=map(int,input().split()) n=[N//2,0] if x&1>0 else [0,N//2] print(*n)