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

import static java.lang.Long.parseLong;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        StringTokenizer st = new StringTokenizer(in.readLine());
        long a = parseLong(st.nextToken()), b = parseLong(st.nextToken());
        long c = parseLong(st.nextToken()), d = parseLong(st.nextToken());

        pw.println(solve(a,b,c,d));
        pw.close();

    }

    static long solve(long a, long b, long c, long d) {
        ArrayList<Long> list = new ArrayList<>();

        list.add((a * c));
        list.add((b * d));
        list.add((a * d));
        list.add((b * c));

        return Collections.max(list);
    }
} import java.io.*; io.* java import java.util.*; util.* java import static java.lang.Long.parseLong; import static java.lang.Long.parseLong; import static java.lang.Long.parseLong; public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        StringTokenizer st = new StringTokenizer(in.readLine());
        long a = parseLong(st.nextToken()), b = parseLong(st.nextToken());
        long c = parseLong(st.nextToken()), d = parseLong(st.nextToken());

        pw.println(solve(a,b,c,d));
        pw.close();

    }

    static long solve(long a, long b, long c, long d) {
        ArrayList<Long> list = new ArrayList<>();

        list.add((a * c));
        list.add((b * d));
        list.add((a * d));
        list.add((b * c));

        return Collections.max(list);
    }
} Main public static void main(String[] args) throws IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        StringTokenizer st = new StringTokenizer(in.readLine());
        long a = parseLong(st.nextToken()), b = parseLong(st.nextToken());
        long c = parseLong(st.nextToken()), d = parseLong(st.nextToken());

        pw.println(solve(a,b,c,d));
        pw.close();

    } main {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        StringTokenizer st = new StringTokenizer(in.readLine());
        long a = parseLong(st.nextToken()), b = parseLong(st.nextToken());
        long c = parseLong(st.nextToken()), d = parseLong(st.nextToken());

        pw.println(solve(a,b,c,d));
        pw.close();

    } BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) PrintWriter pw = new PrintWriter(System.out); pw new PrintWriter(System.out) StringTokenizer st = new StringTokenizer(in.readLine()); st new StringTokenizer(in.readLine()) long a = parseLong(st.nextToken()) a parseLong(st.nextToken()) parseLong st.nextToken() st.nextToken st b = parseLong(st.nextToken()); b parseLong(st.nextToken()) parseLong st.nextToken() st.nextToken st long c = parseLong(st.nextToken()) c parseLong(st.nextToken()) parseLong st.nextToken() st.nextToken st d = parseLong(st.nextToken()); d parseLong(st.nextToken()) parseLong st.nextToken() st.nextToken st pw.println(solve(a,b,c,d)) pw.println pw solve(a,b,c,d) solve a b c d pw.close() pw.close pw String[] args args static long solve(long a, long b, long c, long d) {
        ArrayList<Long> list = new ArrayList<>();

        list.add((a * c));
        list.add((b * d));
        list.add((a * d));
        list.add((b * c));

        return Collections.max(list);
    } solve {
        ArrayList<Long> list = new ArrayList<>();

        list.add((a * c));
        list.add((b * d));
        list.add((a * d));
        list.add((b * c));

        return Collections.max(list);
    } ArrayList<Long> list = new ArrayList<>(); list new ArrayList<>() list.add((a * c)) list.add list (a * c) a c list.add((b * d)) list.add list (b * d) b d list.add((a * d)) list.add list (a * d) a d list.add((b * c)) list.add list (b * c) b c return Collections.max(list); Collections.max(list) Collections.max Collections list long a a long b b long c c long d d public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        StringTokenizer st = new StringTokenizer(in.readLine());
        long a = parseLong(st.nextToken()), b = parseLong(st.nextToken());
        long c = parseLong(st.nextToken()), d = parseLong(st.nextToken());

        pw.println(solve(a,b,c,d));
        pw.close();

    }

    static long solve(long a, long b, long c, long d) {
        ArrayList<Long> list = new ArrayList<>();

        list.add((a * c));
        list.add((b * d));
        list.add((a * d));
        list.add((b * c));

        return Collections.max(list);
    }
} public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        StringTokenizer st = new StringTokenizer(in.readLine());
        long a = parseLong(st.nextToken()), b = parseLong(st.nextToken());
        long c = parseLong(st.nextToken()), d = parseLong(st.nextToken());

        pw.println(solve(a,b,c,d));
        pw.close();

    }

    static long solve(long a, long b, long c, long d) {
        ArrayList<Long> list = new ArrayList<>();

        list.add((a * c));
        list.add((b * d));
        list.add((a * d));
        list.add((b * c));

        return Collections.max(list);
    }
} Main
import java.io.*;
import java.util.*;

import static java.lang.Long.parseLong;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        StringTokenizer st = new StringTokenizer(in.readLine());
        long a = parseLong(st.nextToken()), b = parseLong(st.nextToken());
        long c = parseLong(st.nextToken()), d = parseLong(st.nextToken());

        pw.println(solve(a,b,c,d));
        pw.close();

    }

    static long solve(long a, long b, long c, long d) {
        ArrayList<Long> list = new ArrayList<>();

        list.add((a * c));
        list.add((b * d));
        list.add((a * d));
        list.add((b * c));

        return Collections.max(list);
    }
}