import qualified Data.ByteString.Char8 as BS
import Control.Monad
import Data.Char
import Data.List

getVals::IO [Int]
getVals = unfoldr (BS.readInt . BS.dropWhile isSpace) <$> BS.getLine

main::IO()
main = do
    a:b:c:d:_ <- getVals
    print $ solver a b c d

solver::Int->Int->Int->Int->Int
solver a b c d = maximum [a*c,b*d,a*d,b*c]