main = do
  li <- getLine
  let a:b:c:d:[] = map read $ words li :: [Int]
  let minx = min a b
  let maxx = max a b
  let miny = min c d
  let maxy = max c d
  print $ foldl max (-1000000001) [minx * miny, minx * maxy, maxx * miny, maxx * maxy]
