a,b,c,d = gets.split(" ").map(&:to_i)

ac = a * c
bd = b * d
bc = b * c
ad = a * d

if (a < 0 && c < 0) && (b >= 0 && d >= 0)
  if ac.abs() >= bd.abs()
    puts ac
  else
    puts bd
  end
elsif a < 0 && c < 0
  puts ac
elsif b >= 0 && d >= 0
  puts bd
else
  if a < 0
    puts bc
  else
    puts ad
  end
end
