object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val a, b, c, d = sc.nextLong()
  val products = for {
    l <- List(a, b)
    r <- List(c, d)
  } yield l * r
  println(products.max)
}
