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