require 'pp'

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

if a >= 0 && b >= 0
    if d >= 0
        puts b * d
    else
        puts a * d
    end
elsif a < 0 && b < 0
    if c < 0
        puts a * c
    else
        puts b * c
    end
else
    puts [b * d, a * c].max
end
