a, b, c, d = gets.chomp.split.map(&:to_i)
  
if b < 0 && d < 0
  puts (a * c)
elsif b >= 0 && d >= 0
  puts [(a * c), (b * d)].max
elsif b < 0
  if c < 0
    puts (a * c)
  else
    puts (b * c)
  end
elsif d < 0
  if a < 0
    puts (c * a)
  else
    puts (d * a)
  end
end
