readDouble :: String -> Double
readDouble = read
x ? (a,b) = if x then a else b

main = do
    s <- map readDouble.words<$>getContents
    putStr ((show$solve s) ++ " " ++ (show$solve2 s))

solve :: [Double] -> Double
solve (w:h:_) = w*h/2

solve2 :: [Double] ->  Int
solve2 [w,h,x,y] = (ishalved [w,x] && ishalved [h,y])?(1,0)

ishalved [a,b] = a == b*2
