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

max = b * d
(a..b).each do |a2bNum|
    (c..d).each do |c2dNum|
        if max < a2bNum * c2dNum
            max = a2bNum * c2dNum
        end
    end
end
puts max