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

public class Main {
    private static final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    private static StringTokenizer st;

    private static int readInt() throws IOException {
        while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return Integer.parseInt(st.nextToken());
    }

    public static void main(String[] args) throws IOException {
        long a = readInt();
        long b = readInt();
        long c = readInt();
        long d = readInt();

        long res = Math.max(a * c, a * d);
        long res2 = Math.max(b * c, b * d);
        System.out.println(Math.max(res, res2));
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main {
    private static final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    private static StringTokenizer st;

    private static int readInt() throws IOException {
        while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return Integer.parseInt(st.nextToken());
    }

    public static void main(String[] args) throws IOException {
        long a = readInt();
        long b = readInt();
        long c = readInt();
        long d = readInt();

        long res = Math.max(a * c, a * d);
        long res2 = Math.max(b * c, b * d);
        System.out.println(Math.max(res, res2));
    }
} Main private static final BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) private static StringTokenizer st; st private static int readInt() throws IOException {
        while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return Integer.parseInt(st.nextToken());
    } readInt {
        while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return Integer.parseInt(st.nextToken());
    } while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine()); st == null || !st.hasMoreTokens() st == null st null !st.hasMoreTokens() st.hasMoreTokens() st.hasMoreTokens st st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return Integer.parseInt(st.nextToken()); Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st public static void main(String[] args) throws IOException {
        long a = readInt();
        long b = readInt();
        long c = readInt();
        long d = readInt();

        long res = Math.max(a * c, a * d);
        long res2 = Math.max(b * c, b * d);
        System.out.println(Math.max(res, res2));
    } main {
        long a = readInt();
        long b = readInt();
        long c = readInt();
        long d = readInt();

        long res = Math.max(a * c, a * d);
        long res2 = Math.max(b * c, b * d);
        System.out.println(Math.max(res, res2));
    } long a = readInt(); a readInt() readInt long b = readInt(); b readInt() readInt long c = readInt(); c readInt() readInt long d = readInt(); d readInt() readInt long res = Math.max(a * c, a * d); res Math.max(a * c, a * d) Math.max Math a * c a c a * d a d long res2 = Math.max(b * c, b * d); res2 Math.max(b * c, b * d) Math.max Math b * c b c b * d b d System.out.println(Math.max(res, res2)) System.out.println System.out System System.out Math.max(res, res2) Math.max Math res res2 String[] args args public class Main {
    private static final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    private static StringTokenizer st;

    private static int readInt() throws IOException {
        while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return Integer.parseInt(st.nextToken());
    }

    public static void main(String[] args) throws IOException {
        long a = readInt();
        long b = readInt();
        long c = readInt();
        long d = readInt();

        long res = Math.max(a * c, a * d);
        long res2 = Math.max(b * c, b * d);
        System.out.println(Math.max(res, res2));
    }
} public class Main {
    private static final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    private static StringTokenizer st;

    private static int readInt() throws IOException {
        while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return Integer.parseInt(st.nextToken());
    }

    public static void main(String[] args) throws IOException {
        long a = readInt();
        long b = readInt();
        long c = readInt();
        long d = readInt();

        long res = Math.max(a * c, a * d);
        long res2 = Math.max(b * c, b * d);
        System.out.println(Math.max(res, res2));
    }
} Main
import java.io.*;
import java.util.*;

public class Main {
    private static final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    private static StringTokenizer st;

    private static int readInt() throws IOException {
        while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return Integer.parseInt(st.nextToken());
    }

    public static void main(String[] args) throws IOException {
        long a = readInt();
        long b = readInt();
        long c = readInt();
        long d = readInt();

        long res = Math.max(a * c, a * d);
        long res2 = Math.max(b * c, b * d);
        System.out.println(Math.max(res, res2));
    }
}
