import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            // Input
            long a = Integer.parseInt(sc.next());
            long b = Integer.parseInt(sc.next());
            long c = Integer.parseInt(sc.next());
            long d = Integer.parseInt(sc.next());

            // Solve
            long result = Math.max(a * c, a * d);
            result = Math.max(result, b * c);
            result = Math.max(result, b * d);
            System.out.println(result);
        }
    }

} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            // Input
            long a = Integer.parseInt(sc.next());
            long b = Integer.parseInt(sc.next());
            long c = Integer.parseInt(sc.next());
            long d = Integer.parseInt(sc.next());

            // Solve
            long result = Math.max(a * c, a * d);
            result = Math.max(result, b * c);
            result = Math.max(result, b * d);
            System.out.println(result);
        }
    }

} Main public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            // Input
            long a = Integer.parseInt(sc.next());
            long b = Integer.parseInt(sc.next());
            long c = Integer.parseInt(sc.next());
            long d = Integer.parseInt(sc.next());

            // Solve
            long result = Math.max(a * c, a * d);
            result = Math.max(result, b * c);
            result = Math.max(result, b * d);
            System.out.println(result);
        }
    } main {
        try (Scanner sc = new Scanner(System.in)) {
            // Input
            long a = Integer.parseInt(sc.next());
            long b = Integer.parseInt(sc.next());
            long c = Integer.parseInt(sc.next());
            long d = Integer.parseInt(sc.next());

            // Solve
            long result = Math.max(a * c, a * d);
            result = Math.max(result, b * c);
            result = Math.max(result, b * d);
            System.out.println(result);
        }
    } try (Scanner sc = new Scanner(System.in)) {
            // Input
            long a = Integer.parseInt(sc.next());
            long b = Integer.parseInt(sc.next());
            long c = Integer.parseInt(sc.next());
            long d = Integer.parseInt(sc.next());

            // Solve
            long result = Math.max(a * c, a * d);
            result = Math.max(result, b * c);
            result = Math.max(result, b * d);
            System.out.println(result);
        } {
            // Input
            long a = Integer.parseInt(sc.next());
            long b = Integer.parseInt(sc.next());
            long c = Integer.parseInt(sc.next());
            long d = Integer.parseInt(sc.next());

            // Solve
            long result = Math.max(a * c, a * d);
            result = Math.max(result, b * c);
            result = Math.max(result, b * d);
            System.out.println(result);
        } Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) long a = Integer.parseInt(sc.next()); a Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc long b = Integer.parseInt(sc.next()); b Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc long c = Integer.parseInt(sc.next()); c Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc long d = Integer.parseInt(sc.next()); d Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc long result = Math.max(a * c, a * d); result Math.max(a * c, a * d) Math.max Math a * c a c a * d a d result = Math.max(result, b * c) result Math.max(result, b * c) Math.max Math result b * c b c result = Math.max(result, b * d) result Math.max(result, b * d) Math.max Math result b * d b d System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {

    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            // Input
            long a = Integer.parseInt(sc.next());
            long b = Integer.parseInt(sc.next());
            long c = Integer.parseInt(sc.next());
            long d = Integer.parseInt(sc.next());

            // Solve
            long result = Math.max(a * c, a * d);
            result = Math.max(result, b * c);
            result = Math.max(result, b * d);
            System.out.println(result);
        }
    }

} public class Main {

    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            // Input
            long a = Integer.parseInt(sc.next());
            long b = Integer.parseInt(sc.next());
            long c = Integer.parseInt(sc.next());
            long d = Integer.parseInt(sc.next());

            // Solve
            long result = Math.max(a * c, a * d);
            result = Math.max(result, b * c);
            result = Math.max(result, b * d);
            System.out.println(result);
        }
    }

} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            // Input
            long a = Integer.parseInt(sc.next());
            long b = Integer.parseInt(sc.next());
            long c = Integer.parseInt(sc.next());
            long d = Integer.parseInt(sc.next());

            // Solve
            long result = Math.max(a * c, a * d);
            result = Math.max(result, b * c);
            result = Math.max(result, b * d);
            System.out.println(result);
        }
    }

}