import java.util.*;


public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
		String[] str = line.split(" ", 0);
        long a = Integer.parseInt(str[0]);
        long b = Integer.parseInt(str[1]);
        long c = Integer.parseInt(str[2]);
        long d = Integer.parseInt(str[3]);
        
		long max = 0;

      	for(int i=0;i<=3;i++){
          	max = a * c;
			if(max < a * d){
              	max = a * d;
            }
			if(max < b * c){
              	max = b * c;
            }
   			if(max < b * d){
              	max = b * d;
            }
        }
      
		System.out.println(max);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
		String[] str = line.split(" ", 0);
        long a = Integer.parseInt(str[0]);
        long b = Integer.parseInt(str[1]);
        long c = Integer.parseInt(str[2]);
        long d = Integer.parseInt(str[3]);
        
		long max = 0;

      	for(int i=0;i<=3;i++){
          	max = a * c;
			if(max < a * d){
              	max = a * d;
            }
			if(max < b * c){
              	max = b * c;
            }
   			if(max < b * d){
              	max = b * d;
            }
        }
      
		System.out.println(max);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
		String[] str = line.split(" ", 0);
        long a = Integer.parseInt(str[0]);
        long b = Integer.parseInt(str[1]);
        long c = Integer.parseInt(str[2]);
        long d = Integer.parseInt(str[3]);
        
		long max = 0;

      	for(int i=0;i<=3;i++){
          	max = a * c;
			if(max < a * d){
              	max = a * d;
            }
			if(max < b * c){
              	max = b * c;
            }
   			if(max < b * d){
              	max = b * d;
            }
        }
      
		System.out.println(max);
    } main {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
		String[] str = line.split(" ", 0);
        long a = Integer.parseInt(str[0]);
        long b = Integer.parseInt(str[1]);
        long c = Integer.parseInt(str[2]);
        long d = Integer.parseInt(str[3]);
        
		long max = 0;

      	for(int i=0;i<=3;i++){
          	max = a * c;
			if(max < a * d){
              	max = a * d;
            }
			if(max < b * c){
              	max = b * c;
            }
   			if(max < b * d){
              	max = b * d;
            }
        }
      
		System.out.println(max);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String line = sc.nextLine(); line sc.nextLine() sc.nextLine sc String[] str = line.split(" ", 0); str line.split(" ", 0) line.split line " " 0 long a = Integer.parseInt(str[0]); a Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 long b = Integer.parseInt(str[1]); b Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 long c = Integer.parseInt(str[2]); c Integer.parseInt(str[2]) Integer.parseInt Integer str[2] str 2 long d = Integer.parseInt(str[3]); d Integer.parseInt(str[3]) Integer.parseInt Integer str[3] str 3 long max = 0; max 0 for(int i=0;i<=3;i++){
          	max = a * c;
			if(max < a * d){
              	max = a * d;
            }
			if(max < b * c){
              	max = b * c;
            }
   			if(max < b * d){
              	max = b * d;
            }
        } int i=0; int i=0; i 0 i<=3 i 3 i++ i++ i {
          	max = a * c;
			if(max < a * d){
              	max = a * d;
            }
			if(max < b * c){
              	max = b * c;
            }
   			if(max < b * d){
              	max = b * d;
            }
        } {
          	max = a * c;
			if(max < a * d){
              	max = a * d;
            }
			if(max < b * c){
              	max = b * c;
            }
   			if(max < b * d){
              	max = b * d;
            }
        } max = a * c max a * c a c if(max < a * d){
              	max = a * d;
            } max < a * d max a * d a d {
              	max = a * d;
            } max = a * d max a * d a d if(max < b * c){
              	max = b * c;
            } max < b * c max b * c b c {
              	max = b * c;
            } max = b * c max b * c b c if(max < b * d){
              	max = b * d;
            } max < b * d max b * d b d {
              	max = b * d;
            } max = b * d max b * d b d System.out.println(max) System.out.println System.out System System.out max String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
		String[] str = line.split(" ", 0);
        long a = Integer.parseInt(str[0]);
        long b = Integer.parseInt(str[1]);
        long c = Integer.parseInt(str[2]);
        long d = Integer.parseInt(str[3]);
        
		long max = 0;

      	for(int i=0;i<=3;i++){
          	max = a * c;
			if(max < a * d){
              	max = a * d;
            }
			if(max < b * c){
              	max = b * c;
            }
   			if(max < b * d){
              	max = b * d;
            }
        }
      
		System.out.println(max);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
		String[] str = line.split(" ", 0);
        long a = Integer.parseInt(str[0]);
        long b = Integer.parseInt(str[1]);
        long c = Integer.parseInt(str[2]);
        long d = Integer.parseInt(str[3]);
        
		long max = 0;

      	for(int i=0;i<=3;i++){
          	max = a * c;
			if(max < a * d){
              	max = a * d;
            }
			if(max < b * c){
              	max = b * c;
            }
   			if(max < b * d){
              	max = b * d;
            }
        }
      
		System.out.println(max);
    }
} Main
import java.util.*;


public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
		String[] str = line.split(" ", 0);
        long a = Integer.parseInt(str[0]);
        long b = Integer.parseInt(str[1]);
        long c = Integer.parseInt(str[2]);
        long d = Integer.parseInt(str[3]);
        
		long max = 0;

      	for(int i=0;i<=3;i++){
          	max = a * c;
			if(max < a * d){
              	max = a * d;
            }
			if(max < b * c){
              	max = b * c;
            }
   			if(max < b * d){
              	max = b * d;
            }
        }
      
		System.out.println(max);
    }
}