object Main {
  def main(args: Array[String]): Unit = {
    import scala.io.StdIn.readLine
    val Array(datA,datB,datC,datD) = readLine.split(" ").map(_.toLong)

    val ans = Array(datA * datC, datA * datD, datB * datC, datB * datD).max
    println(ans)
  }
}
