import java.util.*;
import java.io.*;


public class Main{

     public static void main(String []args){
        Scanner scanner = new Scanner(System.in);
        long n1= (long)scanner.nextInt();
        long n2= (long)scanner.nextInt();
        long n3= (long)scanner.nextInt();
        long n4= (long)scanner.nextInt();
        
        long arr[] = new long[4];
        
             arr[0] = n1*n3;
             arr[1] = n1*n4;
             arr[2] = n2*n3;
             arr[3] = n2*n4;
           
           
        Arrays.sort(arr);
    
         System.out.println(arr[arr.length-1]);
        
        
        
        //for(int i=0;i<n;i++)
        //int n= scanner.nextInt();
        //System.out.println()
     }
} import java.util.*; util.* java import java.io.*; io.* java public class Main{

     public static void main(String []args){
        Scanner scanner = new Scanner(System.in);
        long n1= (long)scanner.nextInt();
        long n2= (long)scanner.nextInt();
        long n3= (long)scanner.nextInt();
        long n4= (long)scanner.nextInt();
        
        long arr[] = new long[4];
        
             arr[0] = n1*n3;
             arr[1] = n1*n4;
             arr[2] = n2*n3;
             arr[3] = n2*n4;
           
           
        Arrays.sort(arr);
    
         System.out.println(arr[arr.length-1]);
        
        
        
        //for(int i=0;i<n;i++)
        //int n= scanner.nextInt();
        //System.out.println()
     }
} Main public static void main(String []args){
        Scanner scanner = new Scanner(System.in);
        long n1= (long)scanner.nextInt();
        long n2= (long)scanner.nextInt();
        long n3= (long)scanner.nextInt();
        long n4= (long)scanner.nextInt();
        
        long arr[] = new long[4];
        
             arr[0] = n1*n3;
             arr[1] = n1*n4;
             arr[2] = n2*n3;
             arr[3] = n2*n4;
           
           
        Arrays.sort(arr);
    
         System.out.println(arr[arr.length-1]);
        
        
        
        //for(int i=0;i<n;i++)
        //int n= scanner.nextInt();
        //System.out.println()
     } main {
        Scanner scanner = new Scanner(System.in);
        long n1= (long)scanner.nextInt();
        long n2= (long)scanner.nextInt();
        long n3= (long)scanner.nextInt();
        long n4= (long)scanner.nextInt();
        
        long arr[] = new long[4];
        
             arr[0] = n1*n3;
             arr[1] = n1*n4;
             arr[2] = n2*n3;
             arr[3] = n2*n4;
           
           
        Arrays.sort(arr);
    
         System.out.println(arr[arr.length-1]);
        
        
        
        //for(int i=0;i<n;i++)
        //int n= scanner.nextInt();
        //System.out.println()
     } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) long n1= (long)scanner.nextInt(); n1 (long)scanner.nextInt() scanner.nextInt scanner long n2= (long)scanner.nextInt(); n2 (long)scanner.nextInt() scanner.nextInt scanner long n3= (long)scanner.nextInt(); n3 (long)scanner.nextInt() scanner.nextInt scanner long n4= (long)scanner.nextInt(); n4 (long)scanner.nextInt() scanner.nextInt scanner long arr[] = new long[4]; arr new long[4] 4 arr[0] = n1*n3 arr[0] arr 0 n1*n3 n1 n3 arr[1] = n1*n4 arr[1] arr 1 n1*n4 n1 n4 arr[2] = n2*n3 arr[2] arr 2 n2*n3 n2 n3 arr[3] = n2*n4 arr[3] arr 3 n2*n4 n2 n4 Arrays.sort(arr) Arrays.sort Arrays arr System.out.println(arr[arr.length-1]) System.out.println System.out System System.out arr[arr.length-1] arr arr.length-1 arr.length arr arr.length 1 String []args args public class Main{

     public static void main(String []args){
        Scanner scanner = new Scanner(System.in);
        long n1= (long)scanner.nextInt();
        long n2= (long)scanner.nextInt();
        long n3= (long)scanner.nextInt();
        long n4= (long)scanner.nextInt();
        
        long arr[] = new long[4];
        
             arr[0] = n1*n3;
             arr[1] = n1*n4;
             arr[2] = n2*n3;
             arr[3] = n2*n4;
           
           
        Arrays.sort(arr);
    
         System.out.println(arr[arr.length-1]);
        
        
        
        //for(int i=0;i<n;i++)
        //int n= scanner.nextInt();
        //System.out.println()
     }
} public class Main{

     public static void main(String []args){
        Scanner scanner = new Scanner(System.in);
        long n1= (long)scanner.nextInt();
        long n2= (long)scanner.nextInt();
        long n3= (long)scanner.nextInt();
        long n4= (long)scanner.nextInt();
        
        long arr[] = new long[4];
        
             arr[0] = n1*n3;
             arr[1] = n1*n4;
             arr[2] = n2*n3;
             arr[3] = n2*n4;
           
           
        Arrays.sort(arr);
    
         System.out.println(arr[arr.length-1]);
        
        
        
        //for(int i=0;i<n;i++)
        //int n= scanner.nextInt();
        //System.out.println()
     }
} Main
import java.util.*;
import java.io.*;


public class Main{

     public static void main(String []args){
        Scanner scanner = new Scanner(System.in);
        long n1= (long)scanner.nextInt();
        long n2= (long)scanner.nextInt();
        long n3= (long)scanner.nextInt();
        long n4= (long)scanner.nextInt();
        
        long arr[] = new long[4];
        
             arr[0] = n1*n3;
             arr[1] = n1*n4;
             arr[2] = n2*n3;
             arr[3] = n2*n4;
           
           
        Arrays.sort(arr);
    
         System.out.println(arr[arr.length-1]);
        
        
        
        //for(int i=0;i<n;i++)
        //int n= scanner.nextInt();
        //System.out.println()
     }
}