import java.io.*;
import java.util.*;

public class Main{
    public static void main(String[] args) throws Exception {
        BufferedReader buffer = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb = new StringBuilder();
        String [] inp =buffer.readLine().split(" ");
        long a = Integer.parseInt(inp[0]), b = Integer.parseInt(inp[1]), c = Integer.parseInt(inp[2]), d = Integer.parseInt(inp[3]);
        long res1 = a*d, res2 = a*c, res3 = b*c, res4 = b*d;
        long res = Math.max(res1,Math.max(res2, Math.max(res3, res4)));
        System.out.println(res);
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main{
    public static void main(String[] args) throws Exception {
        BufferedReader buffer = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb = new StringBuilder();
        String [] inp =buffer.readLine().split(" ");
        long a = Integer.parseInt(inp[0]), b = Integer.parseInt(inp[1]), c = Integer.parseInt(inp[2]), d = Integer.parseInt(inp[3]);
        long res1 = a*d, res2 = a*c, res3 = b*c, res4 = b*d;
        long res = Math.max(res1,Math.max(res2, Math.max(res3, res4)));
        System.out.println(res);
    }
} Main public static void main(String[] args) throws Exception {
        BufferedReader buffer = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb = new StringBuilder();
        String [] inp =buffer.readLine().split(" ");
        long a = Integer.parseInt(inp[0]), b = Integer.parseInt(inp[1]), c = Integer.parseInt(inp[2]), d = Integer.parseInt(inp[3]);
        long res1 = a*d, res2 = a*c, res3 = b*c, res4 = b*d;
        long res = Math.max(res1,Math.max(res2, Math.max(res3, res4)));
        System.out.println(res);
    } main {
        BufferedReader buffer = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb = new StringBuilder();
        String [] inp =buffer.readLine().split(" ");
        long a = Integer.parseInt(inp[0]), b = Integer.parseInt(inp[1]), c = Integer.parseInt(inp[2]), d = Integer.parseInt(inp[3]);
        long res1 = a*d, res2 = a*c, res3 = b*c, res4 = b*d;
        long res = Math.max(res1,Math.max(res2, Math.max(res3, res4)));
        System.out.println(res);
    } BufferedReader buffer = new BufferedReader(new InputStreamReader(System.in)); buffer new BufferedReader(new InputStreamReader(System.in)) StringBuilder sb = new StringBuilder(); sb new StringBuilder() String [] inp =buffer.readLine().split(" "); inp buffer.readLine().split(" ") buffer.readLine().split buffer.readLine() buffer.readLine buffer " " long a = Integer.parseInt(inp[0]) a Integer.parseInt(inp[0]) Integer.parseInt Integer inp[0] inp 0 b = Integer.parseInt(inp[1]) b Integer.parseInt(inp[1]) Integer.parseInt Integer inp[1] inp 1 c = Integer.parseInt(inp[2]) c Integer.parseInt(inp[2]) Integer.parseInt Integer inp[2] inp 2 d = Integer.parseInt(inp[3]); d Integer.parseInt(inp[3]) Integer.parseInt Integer inp[3] inp 3 long res1 = a*d res1 a*d a d res2 = a*c res2 a*c a c res3 = b*c res3 b*c b c res4 = b*d; res4 b*d b d long res = Math.max(res1,Math.max(res2, Math.max(res3, res4))); res Math.max(res1,Math.max(res2, Math.max(res3, res4))) Math.max Math res1 Math.max(res2, Math.max(res3, res4)) Math.max Math res2 Math.max(res3, res4) Math.max Math res3 res4 System.out.println(res) System.out.println System.out System System.out res String[] args args public class Main{
    public static void main(String[] args) throws Exception {
        BufferedReader buffer = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb = new StringBuilder();
        String [] inp =buffer.readLine().split(" ");
        long a = Integer.parseInt(inp[0]), b = Integer.parseInt(inp[1]), c = Integer.parseInt(inp[2]), d = Integer.parseInt(inp[3]);
        long res1 = a*d, res2 = a*c, res3 = b*c, res4 = b*d;
        long res = Math.max(res1,Math.max(res2, Math.max(res3, res4)));
        System.out.println(res);
    }
} public class Main{
    public static void main(String[] args) throws Exception {
        BufferedReader buffer = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb = new StringBuilder();
        String [] inp =buffer.readLine().split(" ");
        long a = Integer.parseInt(inp[0]), b = Integer.parseInt(inp[1]), c = Integer.parseInt(inp[2]), d = Integer.parseInt(inp[3]);
        long res1 = a*d, res2 = a*c, res3 = b*c, res4 = b*d;
        long res = Math.max(res1,Math.max(res2, Math.max(res3, res4)));
        System.out.println(res);
    }
} Main
import java.io.*;
import java.util.*;

public class Main{
    public static void main(String[] args) throws Exception {
        BufferedReader buffer = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb = new StringBuilder();
        String [] inp =buffer.readLine().split(" ");
        long a = Integer.parseInt(inp[0]), b = Integer.parseInt(inp[1]), c = Integer.parseInt(inp[2]), d = Integer.parseInt(inp[3]);
        long res1 = a*d, res2 = a*c, res3 = b*c, res4 = b*d;
        long res = Math.max(res1,Math.max(res2, Math.max(res3, res4)));
        System.out.println(res);
    }
}
