def ac(a,c)
    return a*c
end

def ad(a,d)
    return a*d
end

def bc(b,c)
    return b*c
end

def bd(b,d)
    return b*d
end

a,b,c,d = gets.split(" ").map(&:to_i)
ac = ac(a,c)
ad = ad(a,d)
bc = bc(b,c)
bd = bd(b,d)
if ac >= ad
    if ac >= bc
        if ac >= bd
            puts ac
        end
    end
elsif ad >= ac
    if ad >= bc
        if ad >= bd
            puts ad
        end
    end
elsif bc >= ac
    if bc >= ad
        if bc >= bd
            puts bc
        end
    end
elsif bd >= ac
    if bd >= ad
        if bd >= bc
            puts bd
        end
    end
end