program cutting
implicit none
integer w, h, x, y
integer res
real s, ww, hh, xx, yy
read*, w, h, x, y
xx=x
yy=y
ww=w
ww=ww/2
hh=h
hh=h/2
if((xx.eq.ww).and.(yy.eq.hh)) then 
res=1
else if ((xx.ne.ww).or.(yy.ne.hh)) then
res=0
end if
s=w*h
s=s/2
s=w*h-s
print*, s, res
end program