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

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        List<Integer> list = new ArrayList<Integer>();
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int d = sc.nextInt();
        long a1 = (long)a*c;
        long a2 = (long)a*d;
        long a3 = (long)b*c;
        long a4 = (long)b*d;
        //System.out.println(a1+" "+a2+" "+a3+" "+a4+" ");
        System.out.println(Math.max(a1,Math.max(a2,Math.max(a3,a4))));
    }
} import java.util.*; util.* java import java.io.*; io.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        List<Integer> list = new ArrayList<Integer>();
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int d = sc.nextInt();
        long a1 = (long)a*c;
        long a2 = (long)a*d;
        long a3 = (long)b*c;
        long a4 = (long)b*d;
        //System.out.println(a1+" "+a2+" "+a3+" "+a4+" ");
        System.out.println(Math.max(a1,Math.max(a2,Math.max(a3,a4))));
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        List<Integer> list = new ArrayList<Integer>();
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int d = sc.nextInt();
        long a1 = (long)a*c;
        long a2 = (long)a*d;
        long a3 = (long)b*c;
        long a4 = (long)b*d;
        //System.out.println(a1+" "+a2+" "+a3+" "+a4+" ");
        System.out.println(Math.max(a1,Math.max(a2,Math.max(a3,a4))));
    } main {
        Scanner sc = new Scanner(System.in);
        List<Integer> list = new ArrayList<Integer>();
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int d = sc.nextInt();
        long a1 = (long)a*c;
        long a2 = (long)a*d;
        long a3 = (long)b*c;
        long a4 = (long)b*d;
        //System.out.println(a1+" "+a2+" "+a3+" "+a4+" ");
        System.out.println(Math.max(a1,Math.max(a2,Math.max(a3,a4))));
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) List<Integer> list = new ArrayList<Integer>(); list new ArrayList<Integer>() 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 a1 = (long)a*c; a1 (long)a*c (long)a c long a2 = (long)a*d; a2 (long)a*d (long)a d long a3 = (long)b*c; a3 (long)b*c (long)b c long a4 = (long)b*d; a4 (long)b*d (long)b d System.out.println(Math.max(a1,Math.max(a2,Math.max(a3,a4)))) System.out.println System.out System System.out Math.max(a1,Math.max(a2,Math.max(a3,a4))) Math.max Math a1 Math.max(a2,Math.max(a3,a4)) Math.max Math a2 Math.max(a3,a4) Math.max Math a3 a4 String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        List<Integer> list = new ArrayList<Integer>();
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int d = sc.nextInt();
        long a1 = (long)a*c;
        long a2 = (long)a*d;
        long a3 = (long)b*c;
        long a4 = (long)b*d;
        //System.out.println(a1+" "+a2+" "+a3+" "+a4+" ");
        System.out.println(Math.max(a1,Math.max(a2,Math.max(a3,a4))));
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        List<Integer> list = new ArrayList<Integer>();
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int d = sc.nextInt();
        long a1 = (long)a*c;
        long a2 = (long)a*d;
        long a3 = (long)b*c;
        long a4 = (long)b*d;
        //System.out.println(a1+" "+a2+" "+a3+" "+a4+" ");
        System.out.println(Math.max(a1,Math.max(a2,Math.max(a3,a4))));
    }
} Main
import java.util.*;
import java.io.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        List<Integer> list = new ArrayList<Integer>();
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int d = sc.nextInt();
        long a1 = (long)a*c;
        long a2 = (long)a*d;
        long a3 = (long)b*c;
        long a4 = (long)b*d;
        //System.out.println(a1+" "+a2+" "+a3+" "+a4+" ");
        System.out.println(Math.max(a1,Math.max(a2,Math.max(a3,a4))));
    }
}
