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