(async () => {
    let input = '';
    for await (const chunk of process.stdin) input += chunk;
    
    const [a, b, c, d] = input.split(/\s/).map(v => BigInt(+v));
    const max = [a * c, a * d, b * c, b * d].sort((a, b) => (a < b) ? -1 : ((a > b) ? 1 : 0))[3];
    console.log(max.toString());
})();
