#!/bin/bash
read -r a b c d
if (( a <= 0 )) && (( b <= 0 ));then
  if  (( c <= 0 )) && (( d <= 0 )) ;then # OK
    echo $(( b * d ))
  elif (( c >= 0 )) && (( d >= 0 )) ;then # OK
    echo $(( a * c ))
  elif (( c <= 0 )) && (( d >= 0 )) ;then # OK
    echo $(( b * c))
  fi
elif (( a >= 0 )) && (( b >= 0 ));then
  if  (( c <= 0 )) && (( d <= 0 )) ;then # OK
    echo $(( a * d ))
  elif (( c >= 0 )) && (( d >= 0 )) ;then # OK
    echo $(( b * d ))
  elif (( c <= 0 )) && (( d >= 0 )) ;then # OK
    echo $(( b * d ))
  fi
elif (( a <= 0 )) && (( b >= 0 ));then
  if  (( c <= 0 )) && (( d <= 0 )) ;then # OK
    echo $(( a * d ))
  elif (( c >= 0 )) && (( d >= 0 )) ;then # OK
    echo $(( b * d ))
  elif (( c <= 0 )) && (( d >= 0 )) ;then # OK
    if (( ( a * c ) >= ( b * d ) )) ;then
      echo $(( a * c ))
    else
      echo $(( b * d ))
    fi
  fi
fi