import java.util.Scanner;
import java.util.Arrays;

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

        long array[] = new long[4];
        array[0] = a * c;
        array[1] = a * d;
        array[2] = b * c;
        array[3] = b * d;
        Arrays.sort(array);
        
        System.out.println(array[3]);
    }
} import java.util.Scanner; Scanner java.util import java.util.Arrays; Arrays java.util public class Main{
	public static void main(String args[]){
        Scanner scanner = new Scanner(System.in);
        long a = scanner.nextInt();
        long b = scanner.nextInt();
        long c = scanner.nextInt();
        long d = scanner.nextInt();

        long array[] = new long[4];
        array[0] = a * c;
        array[1] = a * d;
        array[2] = b * c;
        array[3] = b * d;
        Arrays.sort(array);
        
        System.out.println(array[3]);
    }
} Main public static void main(String args[]){
        Scanner scanner = new Scanner(System.in);
        long a = scanner.nextInt();
        long b = scanner.nextInt();
        long c = scanner.nextInt();
        long d = scanner.nextInt();

        long array[] = new long[4];
        array[0] = a * c;
        array[1] = a * d;
        array[2] = b * c;
        array[3] = b * d;
        Arrays.sort(array);
        
        System.out.println(array[3]);
    } main {
        Scanner scanner = new Scanner(System.in);
        long a = scanner.nextInt();
        long b = scanner.nextInt();
        long c = scanner.nextInt();
        long d = scanner.nextInt();

        long array[] = new long[4];
        array[0] = a * c;
        array[1] = a * d;
        array[2] = b * c;
        array[3] = b * d;
        Arrays.sort(array);
        
        System.out.println(array[3]);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) long a = scanner.nextInt(); a scanner.nextInt() scanner.nextInt scanner long b = scanner.nextInt(); b scanner.nextInt() scanner.nextInt scanner long c = scanner.nextInt(); c scanner.nextInt() scanner.nextInt scanner long d = scanner.nextInt(); d scanner.nextInt() scanner.nextInt scanner long array[] = new long[4]; array new long[4] 4 array[0] = a * c array[0] array 0 a * c a c array[1] = a * d array[1] array 1 a * d a d array[2] = b * c array[2] array 2 b * c b c array[3] = b * d array[3] array 3 b * d b d Arrays.sort(array) Arrays.sort Arrays array System.out.println(array[3]) System.out.println System.out System System.out array[3] array 3 String args[] args public class Main{
	public static void main(String args[]){
        Scanner scanner = new Scanner(System.in);
        long a = scanner.nextInt();
        long b = scanner.nextInt();
        long c = scanner.nextInt();
        long d = scanner.nextInt();

        long array[] = new long[4];
        array[0] = a * c;
        array[1] = a * d;
        array[2] = b * c;
        array[3] = b * d;
        Arrays.sort(array);
        
        System.out.println(array[3]);
    }
} public class Main{
	public static void main(String args[]){
        Scanner scanner = new Scanner(System.in);
        long a = scanner.nextInt();
        long b = scanner.nextInt();
        long c = scanner.nextInt();
        long d = scanner.nextInt();

        long array[] = new long[4];
        array[0] = a * c;
        array[1] = a * d;
        array[2] = b * c;
        array[3] = b * d;
        Arrays.sort(array);
        
        System.out.println(array[3]);
    }
} Main
import java.util.Scanner;
import java.util.Arrays;

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

        long array[] = new long[4];
        array[0] = a * c;
        array[1] = a * d;
        array[2] = b * c;
        array[3] = b * d;
        Arrays.sort(array);
        
        System.out.println(array[3]);
    }
}