import java.util.Scanner;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long d = sc.nextLong();

        long result = -1000000000000000001L;
        long[] resultArray = new long[4];
        resultArray[0] = a * c;
        resultArray[1] = a * d;
        resultArray[2] = b * c;
        resultArray[3] = b * d;
        for (int i =0; i < resultArray.length; i++) {
            long temp = resultArray[i];
            if (temp > result) {
                result = temp;
            }
        }
        System.out.println(result);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long d = sc.nextLong();

        long result = -1000000000000000001L;
        long[] resultArray = new long[4];
        resultArray[0] = a * c;
        resultArray[1] = a * d;
        resultArray[2] = b * c;
        resultArray[3] = b * d;
        for (int i =0; i < resultArray.length; i++) {
            long temp = resultArray[i];
            if (temp > result) {
                result = temp;
            }
        }
        System.out.println(result);
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long d = sc.nextLong();

        long result = -1000000000000000001L;
        long[] resultArray = new long[4];
        resultArray[0] = a * c;
        resultArray[1] = a * d;
        resultArray[2] = b * c;
        resultArray[3] = b * d;
        for (int i =0; i < resultArray.length; i++) {
            long temp = resultArray[i];
            if (temp > result) {
                result = temp;
            }
        }
        System.out.println(result);
    } main {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long d = sc.nextLong();

        long result = -1000000000000000001L;
        long[] resultArray = new long[4];
        resultArray[0] = a * c;
        resultArray[1] = a * d;
        resultArray[2] = b * c;
        resultArray[3] = b * d;
        for (int i =0; i < resultArray.length; i++) {
            long temp = resultArray[i];
            if (temp > result) {
                result = temp;
            }
        }
        System.out.println(result);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long a = sc.nextLong(); a sc.nextLong() sc.nextLong sc long b = sc.nextLong(); b sc.nextLong() sc.nextLong sc long c = sc.nextLong(); c sc.nextLong() sc.nextLong sc long d = sc.nextLong(); d sc.nextLong() sc.nextLong sc long result = -1000000000000000001L; result -1000000000000000001L 1000000000000000001L long[] resultArray = new long[4]; resultArray new long[4] 4 resultArray[0] = a * c resultArray[0] resultArray 0 a * c a c resultArray[1] = a * d resultArray[1] resultArray 1 a * d a d resultArray[2] = b * c resultArray[2] resultArray 2 b * c b c resultArray[3] = b * d resultArray[3] resultArray 3 b * d b d for (int i =0; i < resultArray.length; i++) {
            long temp = resultArray[i];
            if (temp > result) {
                result = temp;
            }
        } int i =0; int i =0; i 0 i < resultArray.length i resultArray.length resultArray resultArray.length i++ i++ i {
            long temp = resultArray[i];
            if (temp > result) {
                result = temp;
            }
        } {
            long temp = resultArray[i];
            if (temp > result) {
                result = temp;
            }
        } long temp = resultArray[i]; temp resultArray[i] resultArray i if (temp > result) {
                result = temp;
            } temp > result temp result {
                result = temp;
            } result = temp result temp System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long d = sc.nextLong();

        long result = -1000000000000000001L;
        long[] resultArray = new long[4];
        resultArray[0] = a * c;
        resultArray[1] = a * d;
        resultArray[2] = b * c;
        resultArray[3] = b * d;
        for (int i =0; i < resultArray.length; i++) {
            long temp = resultArray[i];
            if (temp > result) {
                result = temp;
            }
        }
        System.out.println(result);
    }
} public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long d = sc.nextLong();

        long result = -1000000000000000001L;
        long[] resultArray = new long[4];
        resultArray[0] = a * c;
        resultArray[1] = a * d;
        resultArray[2] = b * c;
        resultArray[3] = b * d;
        for (int i =0; i < resultArray.length; i++) {
            long temp = resultArray[i];
            if (temp > result) {
                result = temp;
            }
        }
        System.out.println(result);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long d = sc.nextLong();

        long result = -1000000000000000001L;
        long[] resultArray = new long[4];
        resultArray[0] = a * c;
        resultArray[1] = a * d;
        resultArray[2] = b * c;
        resultArray[3] = b * d;
        for (int i =0; i < resultArray.length; i++) {
            long temp = resultArray[i];
            if (temp > result) {
                result = temp;
            }
        }
        System.out.println(result);
    }
}