import java.util.*;

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[] array = new long[4];
        
        array[0] = a * d;
        array[1] = b * c;
        array[2] = a * c;
        array[3] = b * d;
        
        long max = array[0];
        for (int i = 0; i < array.length ; i++) {
            if (max < array[i]) {
                max = array[i];
            }
        }
        
        System.out.println(max);
                
    }
} import java.util.*; util.* java 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[] array = new long[4];
        
        array[0] = a * d;
        array[1] = b * c;
        array[2] = a * c;
        array[3] = b * d;
        
        long max = array[0];
        for (int i = 0; i < array.length ; i++) {
            if (max < array[i]) {
                max = array[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[] array = new long[4];
        
        array[0] = a * d;
        array[1] = b * c;
        array[2] = a * c;
        array[3] = b * d;
        
        long max = array[0];
        for (int i = 0; i < array.length ; i++) {
            if (max < array[i]) {
                max = array[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[] array = new long[4];
        
        array[0] = a * d;
        array[1] = b * c;
        array[2] = a * c;
        array[3] = b * d;
        
        long max = array[0];
        for (int i = 0; i < array.length ; i++) {
            if (max < array[i]) {
                max = array[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[] array = new long[4]; array new long[4] 4 array[0] = a * d array[0] array 0 a * d a d array[1] = b * c array[1] array 1 b * c b c array[2] = a * c array[2] array 2 a * c a c array[3] = b * d array[3] array 3 b * d b d long max = array[0]; max array[0] array 0 for (int i = 0; i < array.length ; i++) {
            if (max < array[i]) {
                max = array[i];
            }
        } int i = 0; int i = 0; i 0 i < array.length i array.length array array.length i++ i++ i {
            if (max < array[i]) {
                max = array[i];
            }
        } {
            if (max < array[i]) {
                max = array[i];
            }
        } if (max < array[i]) {
                max = array[i];
            } max < array[i] max array[i] array i {
                max = array[i];
            } max = array[i] max array[i] array i System.out.println(max) System.out.println System.out System System.out max String[] args args
import java.util.*;

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[] array = new long[4];
        
        array[0] = a * d;
        array[1] = b * c;
        array[2] = a * c;
        array[3] = b * d;
        
        long max = array[0];
        for (int i = 0; i < array.length ; i++) {
            if (max < array[i]) {
                max = array[i];
            }
        }
        
        System.out.println(max);
                
    }
}