import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(
                new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(br.readLine());
        br.close();
        long a = Integer.parseInt(st.nextToken()),
                b = Integer.parseInt(st.nextToken()),
                c = Integer.parseInt(st.nextToken()),
                d = Integer.parseInt(st.nextToken()),
                max = Math.max(Math.max(a * c, a * d), Math.max(b * c, b * d));

        if ((a <= 0 && b >= 0) || (c <= 0 && d >= 0)) {
            max = Math.max(max, 0);
        }

        System.out.println(max);
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.StringTokenizer; StringTokenizer java.util public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(
                new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(br.readLine());
        br.close();
        long a = Integer.parseInt(st.nextToken()),
                b = Integer.parseInt(st.nextToken()),
                c = Integer.parseInt(st.nextToken()),
                d = Integer.parseInt(st.nextToken()),
                max = Math.max(Math.max(a * c, a * d), Math.max(b * c, b * d));

        if ((a <= 0 && b >= 0) || (c <= 0 && d >= 0)) {
            max = Math.max(max, 0);
        }

        System.out.println(max);
    }
} Main public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(
                new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(br.readLine());
        br.close();
        long a = Integer.parseInt(st.nextToken()),
                b = Integer.parseInt(st.nextToken()),
                c = Integer.parseInt(st.nextToken()),
                d = Integer.parseInt(st.nextToken()),
                max = Math.max(Math.max(a * c, a * d), Math.max(b * c, b * d));

        if ((a <= 0 && b >= 0) || (c <= 0 && d >= 0)) {
            max = Math.max(max, 0);
        }

        System.out.println(max);
    } main {
        BufferedReader br = new BufferedReader(
                new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(br.readLine());
        br.close();
        long a = Integer.parseInt(st.nextToken()),
                b = Integer.parseInt(st.nextToken()),
                c = Integer.parseInt(st.nextToken()),
                d = Integer.parseInt(st.nextToken()),
                max = Math.max(Math.max(a * c, a * d), Math.max(b * c, b * d));

        if ((a <= 0 && b >= 0) || (c <= 0 && d >= 0)) {
            max = Math.max(max, 0);
        }

        System.out.println(max);
    } BufferedReader br = new BufferedReader(
                new InputStreamReader(System.in)); br new BufferedReader(
                new InputStreamReader(System.in)) StringTokenizer st = new StringTokenizer(br.readLine()); st new StringTokenizer(br.readLine()) br.close() br.close br long a = Integer.parseInt(st.nextToken()) a Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st b = Integer.parseInt(st.nextToken()) b Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st c = Integer.parseInt(st.nextToken()) c Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st d = Integer.parseInt(st.nextToken()) d Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st max = Math.max(Math.max(a * c, a * d), Math.max(b * c, b * d)); max Math.max(Math.max(a * c, a * d), Math.max(b * c, b * d)) Math.max Math Math.max(a * c, a * d) Math.max Math a * c a c a * d a d Math.max(b * c, b * d) Math.max Math b * c b c b * d b d if ((a <= 0 && b >= 0) || (c <= 0 && d >= 0)) {
            max = Math.max(max, 0);
        } (a <= 0 && b >= 0) || (c <= 0 && d >= 0) (a <= 0 && b >= 0) a <= 0 a 0 b >= 0 b 0 (c <= 0 && d >= 0) c <= 0 c 0 d >= 0 d 0 {
            max = Math.max(max, 0);
        } max = Math.max(max, 0) max Math.max(max, 0) Math.max Math max 0 System.out.println(max) System.out.println System.out System System.out max String[] args args public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(
                new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(br.readLine());
        br.close();
        long a = Integer.parseInt(st.nextToken()),
                b = Integer.parseInt(st.nextToken()),
                c = Integer.parseInt(st.nextToken()),
                d = Integer.parseInt(st.nextToken()),
                max = Math.max(Math.max(a * c, a * d), Math.max(b * c, b * d));

        if ((a <= 0 && b >= 0) || (c <= 0 && d >= 0)) {
            max = Math.max(max, 0);
        }

        System.out.println(max);
    }
} public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(
                new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(br.readLine());
        br.close();
        long a = Integer.parseInt(st.nextToken()),
                b = Integer.parseInt(st.nextToken()),
                c = Integer.parseInt(st.nextToken()),
                d = Integer.parseInt(st.nextToken()),
                max = Math.max(Math.max(a * c, a * d), Math.max(b * c, b * d));

        if ((a <= 0 && b >= 0) || (c <= 0 && d >= 0)) {
            max = Math.max(max, 0);
        }

        System.out.println(max);
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(
                new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(br.readLine());
        br.close();
        long a = Integer.parseInt(st.nextToken()),
                b = Integer.parseInt(st.nextToken()),
                c = Integer.parseInt(st.nextToken()),
                d = Integer.parseInt(st.nextToken()),
                max = Math.max(Math.max(a * c, a * d), Math.max(b * c, b * d));

        if ((a <= 0 && b >= 0) || (c <= 0 && d >= 0)) {
            max = Math.max(max, 0);
        }

        System.out.println(max);
    }
}
