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();
        long ans;
        ans = Math.max(a * c, b * d);
        ans = Math.max(a * d, ans);
        ans = Math.max(b * c, ans);
        if ((a <= 0 && b >= 0) || (c <= 0 && d >= 0)) ans = Math.max(0, ans);
        System.out.println(ans);
    }
} 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();
        long ans;
        ans = Math.max(a * c, b * d);
        ans = Math.max(a * d, ans);
        ans = Math.max(b * c, ans);
        if ((a <= 0 && b >= 0) || (c <= 0 && d >= 0)) ans = Math.max(0, ans);
        System.out.println(ans);
    }
} 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();
        long ans;
        ans = Math.max(a * c, b * d);
        ans = Math.max(a * d, ans);
        ans = Math.max(b * c, ans);
        if ((a <= 0 && b >= 0) || (c <= 0 && d >= 0)) ans = Math.max(0, ans);
        System.out.println(ans);
    } main {
        Scanner scanner = new Scanner(System.in);
        long a = scanner.nextInt();
        long b = scanner.nextInt();
        long c = scanner.nextInt();
        long d = scanner.nextInt();
        long ans;
        ans = Math.max(a * c, b * d);
        ans = Math.max(a * d, ans);
        ans = Math.max(b * c, ans);
        if ((a <= 0 && b >= 0) || (c <= 0 && d >= 0)) ans = Math.max(0, ans);
        System.out.println(ans);
    } 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 long ans; ans ans = Math.max(a * c, b * d) ans Math.max(a * c, b * d) Math.max Math a * c a c b * d b d ans = Math.max(a * d, ans) ans Math.max(a * d, ans) Math.max Math a * d a d ans ans = Math.max(b * c, ans) ans Math.max(b * c, ans) Math.max Math b * c b c ans if ((a <= 0 && b >= 0) || (c <= 0 && d >= 0)) ans = Math.max(0, ans); (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 ans = Math.max(0, ans) ans Math.max(0, ans) Math.max Math 0 ans System.out.println(ans) System.out.println System.out System System.out ans 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();
        long ans;
        ans = Math.max(a * c, b * d);
        ans = Math.max(a * d, ans);
        ans = Math.max(b * c, ans);
        if ((a <= 0 && b >= 0) || (c <= 0 && d >= 0)) ans = Math.max(0, ans);
        System.out.println(ans);
    }
} 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();
        long ans;
        ans = Math.max(a * c, b * d);
        ans = Math.max(a * d, ans);
        ans = Math.max(b * c, ans);
        if ((a <= 0 && b >= 0) || (c <= 0 && d >= 0)) ans = Math.max(0, ans);
        System.out.println(ans);
    }
} 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();
        long ans;
        ans = Math.max(a * c, b * d);
        ans = Math.max(a * d, ans);
        ans = Math.max(b * c, ans);
        if ((a <= 0 && b >= 0) || (c <= 0 && d >= 0)) ans = Math.max(0, ans);
        System.out.println(ans);
    }
}