i = gets.chop.split(' ').map(&:to_i)
xa = (i[0]..i[1]).to_a
ya = (i[2]..i[3]).to_a

first = true
max_value = 0

xa.each do |x|
    ya.each do |y|
        if first
            max_value = x * y
            first = false
        end
        max_value = (max_value < (x * y)) ? (x * y) : max_value
    end
end
p max_value