import java.util.Scanner;

public class Main {
    public static void main(String... args) {
        Scanner scanner = new Scanner(System.in);

        long a = scanner.nextInt();
        long b = scanner.nextInt();
        long c = scanner.nextInt();
        long d = scanner.nextInt();

        System.out.println(Math.max(Math.max(a * c, a * d), Math.max(b * c, b * d)));
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String... args) {
        Scanner scanner = new Scanner(System.in);

        long a = scanner.nextInt();
        long b = scanner.nextInt();
        long c = scanner.nextInt();
        long d = scanner.nextInt();

        System.out.println(Math.max(Math.max(a * c, a * d), Math.max(b * c, b * d)));
    }
} Main public static void main(String... args) {
        Scanner scanner = new Scanner(System.in);

        long a = scanner.nextInt();
        long b = scanner.nextInt();
        long c = scanner.nextInt();
        long d = scanner.nextInt();

        System.out.println(Math.max(Math.max(a * c, a * d), Math.max(b * c, b * d)));
    } main {
        Scanner scanner = new Scanner(System.in);

        long a = scanner.nextInt();
        long b = scanner.nextInt();
        long c = scanner.nextInt();
        long d = scanner.nextInt();

        System.out.println(Math.max(Math.max(a * c, a * d), Math.max(b * c, b * d)));
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) long a = scanner.nextInt(); a scanner.nextInt() scanner.nextInt scanner long b = scanner.nextInt(); b scanner.nextInt() scanner.nextInt scanner long c = scanner.nextInt(); c scanner.nextInt() scanner.nextInt scanner long d = scanner.nextInt(); d scanner.nextInt() scanner.nextInt scanner System.out.println(Math.max(Math.max(a * c, a * d), Math.max(b * c, b * d))) System.out.println System.out System System.out 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 String... args args public class Main {
    public static void main(String... args) {
        Scanner scanner = new Scanner(System.in);

        long a = scanner.nextInt();
        long b = scanner.nextInt();
        long c = scanner.nextInt();
        long d = scanner.nextInt();

        System.out.println(Math.max(Math.max(a * c, a * d), Math.max(b * c, b * d)));
    }
} public class Main {
    public static void main(String... args) {
        Scanner scanner = new Scanner(System.in);

        long a = scanner.nextInt();
        long b = scanner.nextInt();
        long c = scanner.nextInt();
        long d = scanner.nextInt();

        System.out.println(Math.max(Math.max(a * c, a * d), Math.max(b * c, b * d)));
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String... args) {
        Scanner scanner = new Scanner(System.in);

        long a = scanner.nextInt();
        long b = scanner.nextInt();
        long c = scanner.nextInt();
        long d = scanner.nextInt();

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