{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE BangPatterns #-} import Control.Applicative import Control.Monad import Control.Arrow import Data.List import Data.Maybe import Data.Char import Text.Printf readInt = ( readLn :: IO Int ) getInts = map ( read :: String -> Int ) . words <$> getLine which a b f = if f then a else b mp [ a, b ] = ( a, b ) main = do [ b, c ] :: [ Double ] <- sort . map read . words <$> getLine printf "%.12f\n" $ if b == c then sqrt $ b^2 + c^2 else sqrt $ c^2 - b^2