import java.util.Scanner;

public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    long a = scan.nextLong();
    long b = scan.nextLong();
    long c = scan.nextLong();
    long d = scan.nextLong();
    long max = 0;
    
    if(b<=0 && d<=0){
      System.out.println(a*c);
    }else if(a>=0 && c>=0){
      System.out.println(b*d);
    }else if(b<=0 && c>=0){
      System.out.println(b*c);
    }else if(a>=0 && d<=0){
      System.out.println(a*d);
    }else{
      long ac = a*c;
      long bd = b*d;
      if(ac >= bd){
        System.out.println(ac);
      }else{
        System.out.println(bd);
      }
    }
    
  }
}
     import java.util.Scanner; Scanner java.util public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    long a = scan.nextLong();
    long b = scan.nextLong();
    long c = scan.nextLong();
    long d = scan.nextLong();
    long max = 0;
    
    if(b<=0 && d<=0){
      System.out.println(a*c);
    }else if(a>=0 && c>=0){
      System.out.println(b*d);
    }else if(b<=0 && c>=0){
      System.out.println(b*c);
    }else if(a>=0 && d<=0){
      System.out.println(a*d);
    }else{
      long ac = a*c;
      long bd = b*d;
      if(ac >= bd){
        System.out.println(ac);
      }else{
        System.out.println(bd);
      }
    }
    
  }
} Main public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    long a = scan.nextLong();
    long b = scan.nextLong();
    long c = scan.nextLong();
    long d = scan.nextLong();
    long max = 0;
    
    if(b<=0 && d<=0){
      System.out.println(a*c);
    }else if(a>=0 && c>=0){
      System.out.println(b*d);
    }else if(b<=0 && c>=0){
      System.out.println(b*c);
    }else if(a>=0 && d<=0){
      System.out.println(a*d);
    }else{
      long ac = a*c;
      long bd = b*d;
      if(ac >= bd){
        System.out.println(ac);
      }else{
        System.out.println(bd);
      }
    }
    
  } main {
    Scanner scan = new Scanner(System.in);
    long a = scan.nextLong();
    long b = scan.nextLong();
    long c = scan.nextLong();
    long d = scan.nextLong();
    long max = 0;
    
    if(b<=0 && d<=0){
      System.out.println(a*c);
    }else if(a>=0 && c>=0){
      System.out.println(b*d);
    }else if(b<=0 && c>=0){
      System.out.println(b*c);
    }else if(a>=0 && d<=0){
      System.out.println(a*d);
    }else{
      long ac = a*c;
      long bd = b*d;
      if(ac >= bd){
        System.out.println(ac);
      }else{
        System.out.println(bd);
      }
    }
    
  } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) long a = scan.nextLong(); a scan.nextLong() scan.nextLong scan long b = scan.nextLong(); b scan.nextLong() scan.nextLong scan long c = scan.nextLong(); c scan.nextLong() scan.nextLong scan long d = scan.nextLong(); d scan.nextLong() scan.nextLong scan long max = 0; max 0 if(b<=0 && d<=0){
      System.out.println(a*c);
    }else if(a>=0 && c>=0){
      System.out.println(b*d);
    }else if(b<=0 && c>=0){
      System.out.println(b*c);
    }else if(a>=0 && d<=0){
      System.out.println(a*d);
    }else{
      long ac = a*c;
      long bd = b*d;
      if(ac >= bd){
        System.out.println(ac);
      }else{
        System.out.println(bd);
      }
    } b<=0 && d<=0 b<=0 b 0 d<=0 d 0 {
      System.out.println(a*c);
    } System.out.println(a*c) System.out.println System.out System System.out a*c a c if(a>=0 && c>=0){
      System.out.println(b*d);
    }else if(b<=0 && c>=0){
      System.out.println(b*c);
    }else if(a>=0 && d<=0){
      System.out.println(a*d);
    }else{
      long ac = a*c;
      long bd = b*d;
      if(ac >= bd){
        System.out.println(ac);
      }else{
        System.out.println(bd);
      }
    } a>=0 && c>=0 a>=0 a 0 c>=0 c 0 {
      System.out.println(b*d);
    } System.out.println(b*d) System.out.println System.out System System.out b*d b d if(b<=0 && c>=0){
      System.out.println(b*c);
    }else if(a>=0 && d<=0){
      System.out.println(a*d);
    }else{
      long ac = a*c;
      long bd = b*d;
      if(ac >= bd){
        System.out.println(ac);
      }else{
        System.out.println(bd);
      }
    } b<=0 && c>=0 b<=0 b 0 c>=0 c 0 {
      System.out.println(b*c);
    } System.out.println(b*c) System.out.println System.out System System.out b*c b c if(a>=0 && d<=0){
      System.out.println(a*d);
    }else{
      long ac = a*c;
      long bd = b*d;
      if(ac >= bd){
        System.out.println(ac);
      }else{
        System.out.println(bd);
      }
    } a>=0 && d<=0 a>=0 a 0 d<=0 d 0 {
      System.out.println(a*d);
    } System.out.println(a*d) System.out.println System.out System System.out a*d a d {
      long ac = a*c;
      long bd = b*d;
      if(ac >= bd){
        System.out.println(ac);
      }else{
        System.out.println(bd);
      }
    } long ac = a*c; ac a*c a c long bd = b*d; bd b*d b d if(ac >= bd){
        System.out.println(ac);
      }else{
        System.out.println(bd);
      } ac >= bd ac bd {
        System.out.println(ac);
      } System.out.println(ac) System.out.println System.out System System.out ac {
        System.out.println(bd);
      } System.out.println(bd) System.out.println System.out System System.out bd String[] args args public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    long a = scan.nextLong();
    long b = scan.nextLong();
    long c = scan.nextLong();
    long d = scan.nextLong();
    long max = 0;
    
    if(b<=0 && d<=0){
      System.out.println(a*c);
    }else if(a>=0 && c>=0){
      System.out.println(b*d);
    }else if(b<=0 && c>=0){
      System.out.println(b*c);
    }else if(a>=0 && d<=0){
      System.out.println(a*d);
    }else{
      long ac = a*c;
      long bd = b*d;
      if(ac >= bd){
        System.out.println(ac);
      }else{
        System.out.println(bd);
      }
    }
    
  }
} public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    long a = scan.nextLong();
    long b = scan.nextLong();
    long c = scan.nextLong();
    long d = scan.nextLong();
    long max = 0;
    
    if(b<=0 && d<=0){
      System.out.println(a*c);
    }else if(a>=0 && c>=0){
      System.out.println(b*d);
    }else if(b<=0 && c>=0){
      System.out.println(b*c);
    }else if(a>=0 && d<=0){
      System.out.println(a*d);
    }else{
      long ac = a*c;
      long bd = b*d;
      if(ac >= bd){
        System.out.println(ac);
      }else{
        System.out.println(bd);
      }
    }
    
  }
} Main
import java.util.Scanner;

public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    long a = scan.nextLong();
    long b = scan.nextLong();
    long c = scan.nextLong();
    long d = scan.nextLong();
    long max = 0;
    
    if(b<=0 && d<=0){
      System.out.println(a*c);
    }else if(a>=0 && c>=0){
      System.out.println(b*d);
    }else if(b<=0 && c>=0){
      System.out.println(b*c);
    }else if(a>=0 && d<=0){
      System.out.println(a*d);
    }else{
      long ac = a*c;
      long bd = b*d;
      if(ac >= bd){
        System.out.println(ac);
      }else{
        System.out.println(bd);
      }
    }
    
  }
}
    