program Rectangle_Cutting
    implicit none
    real(8):: w,h,x,y
    integer(4):: ans
    read*, w,h,x,y

    if (w/2d0 == x .and. h/2d0 == y) then
        ans = 1
    else
        ans = 0
    end if

    print*, w*h*0.5d0, ans
end program Rectangle_Cutting