import qualified Data.Text.Lazy as T
import qualified Data.Text.Lazy.IO as T
import qualified Data.Text.Lazy.Read as T

main :: IO ()
main = do
  [a, b, c, d] <- map unsafeTextToInt . T.words <$> T.getLine :: IO [Int]
  print . maximum $ [a * c, a * d, b * c, b * d]

unsafeTextToInt :: T.Text -> Int
unsafeTextToInt s = case T.signed T.decimal s of
  Right (n, _) -> n
{-# INLINE unsafeTextToInt #-}
