import java.util.Scanner;

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

        long max = Long.MIN_VALUE;
        if(max < a * c)
            max = a * c;
        if(max < a * d)
            max = a * d;
        if(max < b * c)
            max = b * c;
        if(max < b * d)
            max = b * d;
        
        System.out.println(max);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    static Scanner stdIn = new Scanner(System.in);
    public static void main(String[] args){
        long a = stdIn.nextLong();
        long b = stdIn.nextLong();
        long c = stdIn.nextLong();
        long d = stdIn.nextLong();

        long max = Long.MIN_VALUE;
        if(max < a * c)
            max = a * c;
        if(max < a * d)
            max = a * d;
        if(max < b * c)
            max = b * c;
        if(max < b * d)
            max = b * d;
        
        System.out.println(max);
    }
} Main static Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) public static void main(String[] args){
        long a = stdIn.nextLong();
        long b = stdIn.nextLong();
        long c = stdIn.nextLong();
        long d = stdIn.nextLong();

        long max = Long.MIN_VALUE;
        if(max < a * c)
            max = a * c;
        if(max < a * d)
            max = a * d;
        if(max < b * c)
            max = b * c;
        if(max < b * d)
            max = b * d;
        
        System.out.println(max);
    } main {
        long a = stdIn.nextLong();
        long b = stdIn.nextLong();
        long c = stdIn.nextLong();
        long d = stdIn.nextLong();

        long max = Long.MIN_VALUE;
        if(max < a * c)
            max = a * c;
        if(max < a * d)
            max = a * d;
        if(max < b * c)
            max = b * c;
        if(max < b * d)
            max = b * d;
        
        System.out.println(max);
    } long a = stdIn.nextLong(); a stdIn.nextLong() stdIn.nextLong stdIn long b = stdIn.nextLong(); b stdIn.nextLong() stdIn.nextLong stdIn long c = stdIn.nextLong(); c stdIn.nextLong() stdIn.nextLong stdIn long d = stdIn.nextLong(); d stdIn.nextLong() stdIn.nextLong stdIn long max = Long.MIN_VALUE; max Long.MIN_VALUE Long Long.MIN_VALUE if(max < a * c)
            max = a * c; max < a * c max a * c a c max = a * c max a * c a c if(max < a * d)
            max = a * d; max < a * d max a * d a d max = a * d max a * d a d if(max < b * c)
            max = b * c; max < b * c max b * c b c max = b * c max b * c b c if(max < b * d)
            max = b * d; max < b * d max b * d b d max = b * d max b * d b d System.out.println(max) System.out.println System.out System System.out max String[] args args public class Main {
    static Scanner stdIn = new Scanner(System.in);
    public static void main(String[] args){
        long a = stdIn.nextLong();
        long b = stdIn.nextLong();
        long c = stdIn.nextLong();
        long d = stdIn.nextLong();

        long max = Long.MIN_VALUE;
        if(max < a * c)
            max = a * c;
        if(max < a * d)
            max = a * d;
        if(max < b * c)
            max = b * c;
        if(max < b * d)
            max = b * d;
        
        System.out.println(max);
    }
} public class Main {
    static Scanner stdIn = new Scanner(System.in);
    public static void main(String[] args){
        long a = stdIn.nextLong();
        long b = stdIn.nextLong();
        long c = stdIn.nextLong();
        long d = stdIn.nextLong();

        long max = Long.MIN_VALUE;
        if(max < a * c)
            max = a * c;
        if(max < a * d)
            max = a * d;
        if(max < b * c)
            max = b * c;
        if(max < b * d)
            max = b * d;
        
        System.out.println(max);
    }
} Main
import java.util.Scanner;

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

        long max = Long.MIN_VALUE;
        if(max < a * c)
            max = a * c;
        if(max < a * d)
            max = a * d;
        if(max < b * c)
            max = b * c;
        if(max < b * d)
            max = b * d;
        
        System.out.println(max);
    }
}