import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int d = sc.nextInt();

        long output = (long)a*c;
        output = Math.max(output, (long)a*d);
        output = Math.max(output, (long)b*c);
        output = Math.max(output, (long)b*d);
        
        System.out.println(output);
        
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int d = sc.nextInt();

        long output = (long)a*c;
        output = Math.max(output, (long)a*d);
        output = Math.max(output, (long)b*c);
        output = Math.max(output, (long)b*d);
        
        System.out.println(output);
        
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int d = sc.nextInt();

        long output = (long)a*c;
        output = Math.max(output, (long)a*d);
        output = Math.max(output, (long)b*c);
        output = Math.max(output, (long)b*d);
        
        System.out.println(output);
        
    } main {
        Scanner sc = new Scanner(System.in);

        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int d = sc.nextInt();

        long output = (long)a*c;
        output = Math.max(output, (long)a*d);
        output = Math.max(output, (long)b*c);
        output = Math.max(output, (long)b*d);
        
        System.out.println(output);
        
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int c = sc.nextInt(); c sc.nextInt() sc.nextInt sc int d = sc.nextInt(); d sc.nextInt() sc.nextInt sc long output = (long)a*c; output (long)a*c (long)a c output = Math.max(output, (long)a*d) output Math.max(output, (long)a*d) Math.max Math output (long)a*d (long)a d output = Math.max(output, (long)b*c) output Math.max(output, (long)b*c) Math.max Math output (long)b*c (long)b c output = Math.max(output, (long)b*d) output Math.max(output, (long)b*d) Math.max Math output (long)b*d (long)b d System.out.println(output) System.out.println System.out System System.out output String[] args args public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int d = sc.nextInt();

        long output = (long)a*c;
        output = Math.max(output, (long)a*d);
        output = Math.max(output, (long)b*c);
        output = Math.max(output, (long)b*d);
        
        System.out.println(output);
        
    }
} public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int d = sc.nextInt();

        long output = (long)a*c;
        output = Math.max(output, (long)a*d);
        output = Math.max(output, (long)b*c);
        output = Math.max(output, (long)b*d);
        
        System.out.println(output);
        
    }
} Main
import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int d = sc.nextInt();

        long output = (long)a*c;
        output = Math.max(output, (long)a*d);
        output = Math.max(output, (long)b*c);
        output = Math.max(output, (long)b*d);
        
        System.out.println(output);
        
    }
}
