A, B, C, D = gets.split.map(&:to_i)
MAX_INT = 10**9
x_list = [A, B]
x_list << A+1 if A <  MAX_INT && A+1 <= B
x_list << B-1 if B > -MAX_INT && B-1 >= A
y_list = [C, D]
y_list << C+1 if C <  MAX_INT && C+1 <= D
y_list << D-1 if D > -MAX_INT && D-1 >= C
max_val = -MAX_INT - 1
x_list.each do |x|
    y_list.each do |y|
        max_val = [x*y, max_val].max
    end
end
puts max_val