import java.util.*;
public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long A = sc.nextInt();
        long B = sc.nextInt();
        long C = sc.nextInt();
        long D = sc.nextInt();
        long ancs[] = new long[4];
    
        ancs[0] = A*C;
        ancs[1] = A*D;
        ancs[2] = B*C;
        ancs[3] = B*D;

        long max = ancs[0];
        for(int i = 0;i < 4;i++){
            if(max < ancs[i]){
                max = ancs[i];
            }
        }
        
        System.out.println(max);
    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long A = sc.nextInt();
        long B = sc.nextInt();
        long C = sc.nextInt();
        long D = sc.nextInt();
        long ancs[] = new long[4];
    
        ancs[0] = A*C;
        ancs[1] = A*D;
        ancs[2] = B*C;
        ancs[3] = B*D;

        long max = ancs[0];
        for(int i = 0;i < 4;i++){
            if(max < ancs[i]){
                max = ancs[i];
            }
        }
        
        System.out.println(max);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long A = sc.nextInt();
        long B = sc.nextInt();
        long C = sc.nextInt();
        long D = sc.nextInt();
        long ancs[] = new long[4];
    
        ancs[0] = A*C;
        ancs[1] = A*D;
        ancs[2] = B*C;
        ancs[3] = B*D;

        long max = ancs[0];
        for(int i = 0;i < 4;i++){
            if(max < ancs[i]){
                max = ancs[i];
            }
        }
        
        System.out.println(max);
    } main {
        Scanner sc = new Scanner(System.in);
        long A = sc.nextInt();
        long B = sc.nextInt();
        long C = sc.nextInt();
        long D = sc.nextInt();
        long ancs[] = new long[4];
    
        ancs[0] = A*C;
        ancs[1] = A*D;
        ancs[2] = B*C;
        ancs[3] = B*D;

        long max = ancs[0];
        for(int i = 0;i < 4;i++){
            if(max < ancs[i]){
                max = ancs[i];
            }
        }
        
        System.out.println(max);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long A = sc.nextInt(); A sc.nextInt() sc.nextInt sc long B = sc.nextInt(); B sc.nextInt() sc.nextInt sc long C = sc.nextInt(); C sc.nextInt() sc.nextInt sc long D = sc.nextInt(); D sc.nextInt() sc.nextInt sc long ancs[] = new long[4]; ancs new long[4] 4 ancs[0] = A*C ancs[0] ancs 0 A*C A C ancs[1] = A*D ancs[1] ancs 1 A*D A D ancs[2] = B*C ancs[2] ancs 2 B*C B C ancs[3] = B*D ancs[3] ancs 3 B*D B D long max = ancs[0]; max ancs[0] ancs 0 for(int i = 0;i < 4;i++){
            if(max < ancs[i]){
                max = ancs[i];
            }
        } int i = 0; int i = 0; i 0 i < 4 i 4 i++ i++ i {
            if(max < ancs[i]){
                max = ancs[i];
            }
        } {
            if(max < ancs[i]){
                max = ancs[i];
            }
        } if(max < ancs[i]){
                max = ancs[i];
            } max < ancs[i] max ancs[i] ancs i {
                max = ancs[i];
            } max = ancs[i] max ancs[i] ancs i 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);
        long A = sc.nextInt();
        long B = sc.nextInt();
        long C = sc.nextInt();
        long D = sc.nextInt();
        long ancs[] = new long[4];
    
        ancs[0] = A*C;
        ancs[1] = A*D;
        ancs[2] = B*C;
        ancs[3] = B*D;

        long max = ancs[0];
        for(int i = 0;i < 4;i++){
            if(max < ancs[i]){
                max = ancs[i];
            }
        }
        
        System.out.println(max);
    }
} public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long A = sc.nextInt();
        long B = sc.nextInt();
        long C = sc.nextInt();
        long D = sc.nextInt();
        long ancs[] = new long[4];
    
        ancs[0] = A*C;
        ancs[1] = A*D;
        ancs[2] = B*C;
        ancs[3] = B*D;

        long max = ancs[0];
        for(int i = 0;i < 4;i++){
            if(max < ancs[i]){
                max = ancs[i];
            }
        }
        
        System.out.println(max);
    }
} Main
import java.util.*;
public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long A = sc.nextInt();
        long B = sc.nextInt();
        long C = sc.nextInt();
        long D = sc.nextInt();
        long ancs[] = new long[4];
    
        ancs[0] = A*C;
        ancs[1] = A*D;
        ancs[2] = B*C;
        ancs[3] = B*D;

        long max = ancs[0];
        for(int i = 0;i < 4;i++){
            if(max < ancs[i]){
                max = ancs[i];
            }
        }
        
        System.out.println(max);
    }
}