const main = (input) => {
  const [a, b, c, d] = input.trim().split(' ').map(Number)

  let ans = -Infinity

  for (let x=a; x<=b; x++) {
    for (let y=c; y<=d; y++) {
      ans = Math.max(ans, x*y)
    }
  }

  return console.log(ans)
}

process.env.MYTEST
  ? (process.env.MYTEST === 'test' ? test() : main(require('fs').readFileSync('dev/stdin', 'utf8')))
  : main(require('fs').readFileSync('/dev/stdin', 'utf8'))