import Control.Applicative ((<$>)) findP :: Double -> Double -> Double -> Double -> Double findP xa ya xb yb = ya - t * xa where t = (ya - yb) / (xa + xb) main :: IO () main = do [xa, ya] <- map read . words <$> getLine [xb, yb] <- map read . words <$> getLine print $ findP xa ya xb yb