import java.util.*;


public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        String[] lines = line.split(" ", 0);
        long a = Long.parseLong(lines[0]);
        long b = Long.parseLong(lines[1]);
        long c = Long.parseLong(lines[2]);
        long d = Long.parseLong(lines[3]);
        
        long x1 = a * c;
        long x2 = a * d;
        long x3 = b * c;
        long x4 = b * d;

        System.out.println(Math.max(Math.max(x1, x2), Math.max(x3, x4)));
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        String[] lines = line.split(" ", 0);
        long a = Long.parseLong(lines[0]);
        long b = Long.parseLong(lines[1]);
        long c = Long.parseLong(lines[2]);
        long d = Long.parseLong(lines[3]);
        
        long x1 = a * c;
        long x2 = a * d;
        long x3 = b * c;
        long x4 = b * d;

        System.out.println(Math.max(Math.max(x1, x2), Math.max(x3, x4)));
    }
} Main public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        String[] lines = line.split(" ", 0);
        long a = Long.parseLong(lines[0]);
        long b = Long.parseLong(lines[1]);
        long c = Long.parseLong(lines[2]);
        long d = Long.parseLong(lines[3]);
        
        long x1 = a * c;
        long x2 = a * d;
        long x3 = b * c;
        long x4 = b * d;

        System.out.println(Math.max(Math.max(x1, x2), Math.max(x3, x4)));
    } main {

        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        String[] lines = line.split(" ", 0);
        long a = Long.parseLong(lines[0]);
        long b = Long.parseLong(lines[1]);
        long c = Long.parseLong(lines[2]);
        long d = Long.parseLong(lines[3]);
        
        long x1 = a * c;
        long x2 = a * d;
        long x3 = b * c;
        long x4 = b * d;

        System.out.println(Math.max(Math.max(x1, x2), Math.max(x3, x4)));
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String line = sc.nextLine(); line sc.nextLine() sc.nextLine sc String[] lines = line.split(" ", 0); lines line.split(" ", 0) line.split line " " 0 long a = Long.parseLong(lines[0]); a Long.parseLong(lines[0]) Long.parseLong Long lines[0] lines 0 long b = Long.parseLong(lines[1]); b Long.parseLong(lines[1]) Long.parseLong Long lines[1] lines 1 long c = Long.parseLong(lines[2]); c Long.parseLong(lines[2]) Long.parseLong Long lines[2] lines 2 long d = Long.parseLong(lines[3]); d Long.parseLong(lines[3]) Long.parseLong Long lines[3] lines 3 long x1 = a * c; x1 a * c a c long x2 = a * d; x2 a * d a d long x3 = b * c; x3 b * c b c long x4 = b * d; x4 b * d b d System.out.println(Math.max(Math.max(x1, x2), Math.max(x3, x4))) System.out.println System.out System System.out Math.max(Math.max(x1, x2), Math.max(x3, x4)) Math.max Math Math.max(x1, x2) Math.max Math x1 x2 Math.max(x3, x4) Math.max Math x3 x4 String[] args args public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        String[] lines = line.split(" ", 0);
        long a = Long.parseLong(lines[0]);
        long b = Long.parseLong(lines[1]);
        long c = Long.parseLong(lines[2]);
        long d = Long.parseLong(lines[3]);
        
        long x1 = a * c;
        long x2 = a * d;
        long x3 = b * c;
        long x4 = b * d;

        System.out.println(Math.max(Math.max(x1, x2), Math.max(x3, x4)));
    }
} public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        String[] lines = line.split(" ", 0);
        long a = Long.parseLong(lines[0]);
        long b = Long.parseLong(lines[1]);
        long c = Long.parseLong(lines[2]);
        long d = Long.parseLong(lines[3]);
        
        long x1 = a * c;
        long x2 = a * d;
        long x3 = b * c;
        long x4 = b * d;

        System.out.println(Math.max(Math.max(x1, x2), Math.max(x3, x4)));
    }
} Main
import java.util.*;


public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        String[] lines = line.split(" ", 0);
        long a = Long.parseLong(lines[0]);
        long b = Long.parseLong(lines[1]);
        long c = Long.parseLong(lines[2]);
        long d = Long.parseLong(lines[3]);
        
        long x1 = a * c;
        long x2 = a * d;
        long x3 = b * c;
        long x4 = b * d;

        System.out.println(Math.max(Math.max(x1, x2), Math.max(x3, x4)));
    }
}