import java.util.Scanner;

public class Main {
    public long getMaxProduct(int a, int b, int c, int d) {
        long cand1 = (long) a * (long) c;
        long cand2 = (long) a * (long) d;
        long cand3 = (long) b * (long) c;
        long cand4 = (long) b * (long) d;
        return Math.max(Math.max(cand1, cand2), Math.max(cand3, cand4));
    }

    public static void main(String[] args) throws Exception {
        Main solution = new Main();

        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int c = scanner.nextInt();
        int d = scanner.nextInt();

        long answer = solution.getMaxProduct(a, b, c, d);
        System.out.println(answer);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public long getMaxProduct(int a, int b, int c, int d) {
        long cand1 = (long) a * (long) c;
        long cand2 = (long) a * (long) d;
        long cand3 = (long) b * (long) c;
        long cand4 = (long) b * (long) d;
        return Math.max(Math.max(cand1, cand2), Math.max(cand3, cand4));
    }

    public static void main(String[] args) throws Exception {
        Main solution = new Main();

        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int c = scanner.nextInt();
        int d = scanner.nextInt();

        long answer = solution.getMaxProduct(a, b, c, d);
        System.out.println(answer);
    }
} Main public long getMaxProduct(int a, int b, int c, int d) {
        long cand1 = (long) a * (long) c;
        long cand2 = (long) a * (long) d;
        long cand3 = (long) b * (long) c;
        long cand4 = (long) b * (long) d;
        return Math.max(Math.max(cand1, cand2), Math.max(cand3, cand4));
    } getMaxProduct {
        long cand1 = (long) a * (long) c;
        long cand2 = (long) a * (long) d;
        long cand3 = (long) b * (long) c;
        long cand4 = (long) b * (long) d;
        return Math.max(Math.max(cand1, cand2), Math.max(cand3, cand4));
    } long cand1 = (long) a * (long) c; cand1 (long) a * (long) c (long) a (long) c long cand2 = (long) a * (long) d; cand2 (long) a * (long) d (long) a (long) d long cand3 = (long) b * (long) c; cand3 (long) b * (long) c (long) b (long) c long cand4 = (long) b * (long) d; cand4 (long) b * (long) d (long) b (long) d return Math.max(Math.max(cand1, cand2), Math.max(cand3, cand4)); Math.max(Math.max(cand1, cand2), Math.max(cand3, cand4)) Math.max Math Math.max(cand1, cand2) Math.max Math cand1 cand2 Math.max(cand3, cand4) Math.max Math cand3 cand4 int a a int b b int c c int d d public static void main(String[] args) throws Exception {
        Main solution = new Main();

        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int c = scanner.nextInt();
        int d = scanner.nextInt();

        long answer = solution.getMaxProduct(a, b, c, d);
        System.out.println(answer);
    } main {
        Main solution = new Main();

        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int c = scanner.nextInt();
        int d = scanner.nextInt();

        long answer = solution.getMaxProduct(a, b, c, d);
        System.out.println(answer);
    } Main solution = new Main(); solution new Main() Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int a = scanner.nextInt(); a scanner.nextInt() scanner.nextInt scanner int b = scanner.nextInt(); b scanner.nextInt() scanner.nextInt scanner int c = scanner.nextInt(); c scanner.nextInt() scanner.nextInt scanner int d = scanner.nextInt(); d scanner.nextInt() scanner.nextInt scanner long answer = solution.getMaxProduct(a, b, c, d); answer solution.getMaxProduct(a, b, c, d) solution.getMaxProduct solution a b c d System.out.println(answer) System.out.println System.out System System.out answer String[] args args public class Main {
    public long getMaxProduct(int a, int b, int c, int d) {
        long cand1 = (long) a * (long) c;
        long cand2 = (long) a * (long) d;
        long cand3 = (long) b * (long) c;
        long cand4 = (long) b * (long) d;
        return Math.max(Math.max(cand1, cand2), Math.max(cand3, cand4));
    }

    public static void main(String[] args) throws Exception {
        Main solution = new Main();

        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int c = scanner.nextInt();
        int d = scanner.nextInt();

        long answer = solution.getMaxProduct(a, b, c, d);
        System.out.println(answer);
    }
} public class Main {
    public long getMaxProduct(int a, int b, int c, int d) {
        long cand1 = (long) a * (long) c;
        long cand2 = (long) a * (long) d;
        long cand3 = (long) b * (long) c;
        long cand4 = (long) b * (long) d;
        return Math.max(Math.max(cand1, cand2), Math.max(cand3, cand4));
    }

    public static void main(String[] args) throws Exception {
        Main solution = new Main();

        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int c = scanner.nextInt();
        int d = scanner.nextInt();

        long answer = solution.getMaxProduct(a, b, c, d);
        System.out.println(answer);
    }
} Main
import java.util.Scanner;

public class Main {
    public long getMaxProduct(int a, int b, int c, int d) {
        long cand1 = (long) a * (long) c;
        long cand2 = (long) a * (long) d;
        long cand3 = (long) b * (long) c;
        long cand4 = (long) b * (long) d;
        return Math.max(Math.max(cand1, cand2), Math.max(cand3, cand4));
    }

    public static void main(String[] args) throws Exception {
        Main solution = new Main();

        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int c = scanner.nextInt();
        int d = scanner.nextInt();

        long answer = solution.getMaxProduct(a, b, c, d);
        System.out.println(answer);
    }
}