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

if (a..b).min.positive?
  if (c..d).min.positive?
    puts (a..b).max * (c..d).max
  else
    puts (a..b).min * (c..d).max
  end
else
  if (c..d).min.positive?
    puts (a..b).max * (c..d).min
  else
    puts (a..b).min * (c..d).min
  end
end
