main :: IO ()

isCenter w h x y | w == x / 2 && h == y / 2 = '1'
                 | otherwise                = '0'

main = do
    [w, h, x, y] <- map (read :: String -> Double) . words <$> getLine
    print $ isCenter w h x y


