program rectangle_cutting
  implicit none
  real(8) :: w, h, x, y
  integer :: m
  character(32) :: s
  read(*,*) w, h, x, y
  write(s,'(f18.12)') 0.5d0*w*h
  m = 0
  if ((x.eq.0.5d0*w).and.(y.eq.0.5d0*h)) m = 1
  write(*,'(a,x,i0)') trim(adjustl(s)), m
  stop
end program rectangle_cutting