import Data.Maybe
import Text.Printf
import qualified Data.ByteString.Char8 as C

getInts :: IO [Int]
getInts = map (fst . fromJust . C.readInt) . C.words <$> C.getLine

main :: IO ()
main = do
  [a, b, c, d] <- getInts
  printf "%d\n" $ maximum [a * c, a * d, b * c, b * d]
