(async () => {
    let input = '';
    for await (const chunk of process.stdin) input += chunk;
    
    const [a, b, c, d] = input.split(/\s/).map(v => +v);
    const max = Math.max(a * c, a * d, b * c, b * d);
    if(max > 0){
        console.log(max);
    }else{
        console.log(0);
    }
})();
