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

if (a..b).all?(&:positive?)
  if (c..d).all?(&:positive?) 
    puts (a..b).max * (c..d).max
  else
    puts (a..b).min * (c..d).max
  end
else
  if !(c..d).all?(&:positive?)
    puts (a..b).min * (c..d).min
  elsif (c..d).include?(0)
    puts 0
  else
    puts (a..b).max * (c..d).min
  end
end
