import java.util.Scanner;

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

        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long d = sc.nextLong();

        if (a == 0 && b == 0 || c == 0 && d == 0) {
            System.out.println(0);
            return;
        } else if (a > 0 && d < 0) {
            System.out.println(a * d);
            return;
        } else if (b < 0 && c > 0) {
            System.out.println(b * c);
            return;
        } else if (a == 0 && d < 0 || c == 0 && b < 0) {
            System.out.println(0);
            return;
        } else if (a >= 0 || c >= 0) {
            System.out.println(b * d);
            return;
        } else if (a < 0 && b > 0 && c < 0 && d > 0) {
            System.out.println(Math.max(a * c, b * d));
            return;
        } else {
            System.out.println(a * c);
            return;
        }

    }

} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long d = sc.nextLong();

        if (a == 0 && b == 0 || c == 0 && d == 0) {
            System.out.println(0);
            return;
        } else if (a > 0 && d < 0) {
            System.out.println(a * d);
            return;
        } else if (b < 0 && c > 0) {
            System.out.println(b * c);
            return;
        } else if (a == 0 && d < 0 || c == 0 && b < 0) {
            System.out.println(0);
            return;
        } else if (a >= 0 || c >= 0) {
            System.out.println(b * d);
            return;
        } else if (a < 0 && b > 0 && c < 0 && d > 0) {
            System.out.println(Math.max(a * c, b * d));
            return;
        } else {
            System.out.println(a * c);
            return;
        }

    }

} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long d = sc.nextLong();

        if (a == 0 && b == 0 || c == 0 && d == 0) {
            System.out.println(0);
            return;
        } else if (a > 0 && d < 0) {
            System.out.println(a * d);
            return;
        } else if (b < 0 && c > 0) {
            System.out.println(b * c);
            return;
        } else if (a == 0 && d < 0 || c == 0 && b < 0) {
            System.out.println(0);
            return;
        } else if (a >= 0 || c >= 0) {
            System.out.println(b * d);
            return;
        } else if (a < 0 && b > 0 && c < 0 && d > 0) {
            System.out.println(Math.max(a * c, b * d));
            return;
        } else {
            System.out.println(a * c);
            return;
        }

    } main {
        Scanner sc = new Scanner(System.in);

        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long d = sc.nextLong();

        if (a == 0 && b == 0 || c == 0 && d == 0) {
            System.out.println(0);
            return;
        } else if (a > 0 && d < 0) {
            System.out.println(a * d);
            return;
        } else if (b < 0 && c > 0) {
            System.out.println(b * c);
            return;
        } else if (a == 0 && d < 0 || c == 0 && b < 0) {
            System.out.println(0);
            return;
        } else if (a >= 0 || c >= 0) {
            System.out.println(b * d);
            return;
        } else if (a < 0 && b > 0 && c < 0 && d > 0) {
            System.out.println(Math.max(a * c, b * d));
            return;
        } else {
            System.out.println(a * c);
            return;
        }

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long a = sc.nextLong(); a sc.nextLong() sc.nextLong sc long b = sc.nextLong(); b sc.nextLong() sc.nextLong sc long c = sc.nextLong(); c sc.nextLong() sc.nextLong sc long d = sc.nextLong(); d sc.nextLong() sc.nextLong sc if (a == 0 && b == 0 || c == 0 && d == 0) {
            System.out.println(0);
            return;
        } else if (a > 0 && d < 0) {
            System.out.println(a * d);
            return;
        } else if (b < 0 && c > 0) {
            System.out.println(b * c);
            return;
        } else if (a == 0 && d < 0 || c == 0 && b < 0) {
            System.out.println(0);
            return;
        } else if (a >= 0 || c >= 0) {
            System.out.println(b * d);
            return;
        } else if (a < 0 && b > 0 && c < 0 && d > 0) {
            System.out.println(Math.max(a * c, b * d));
            return;
        } else {
            System.out.println(a * c);
            return;
        } 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 {
            System.out.println(0);
            return;
        } System.out.println(0) System.out.println System.out System System.out 0 return; if (a > 0 && d < 0) {
            System.out.println(a * d);
            return;
        } else if (b < 0 && c > 0) {
            System.out.println(b * c);
            return;
        } else if (a == 0 && d < 0 || c == 0 && b < 0) {
            System.out.println(0);
            return;
        } else if (a >= 0 || c >= 0) {
            System.out.println(b * d);
            return;
        } else if (a < 0 && b > 0 && c < 0 && d > 0) {
            System.out.println(Math.max(a * c, b * d));
            return;
        } else {
            System.out.println(a * c);
            return;
        } a > 0 && d < 0 a > 0 a 0 d < 0 d 0 {
            System.out.println(a * d);
            return;
        } System.out.println(a * d) System.out.println System.out System System.out a * d a d return; if (b < 0 && c > 0) {
            System.out.println(b * c);
            return;
        } else if (a == 0 && d < 0 || c == 0 && b < 0) {
            System.out.println(0);
            return;
        } else if (a >= 0 || c >= 0) {
            System.out.println(b * d);
            return;
        } else if (a < 0 && b > 0 && c < 0 && d > 0) {
            System.out.println(Math.max(a * c, b * d));
            return;
        } else {
            System.out.println(a * c);
            return;
        } b < 0 && c > 0 b < 0 b 0 c > 0 c 0 {
            System.out.println(b * c);
            return;
        } System.out.println(b * c) System.out.println System.out System System.out b * c b c return; if (a == 0 && d < 0 || c == 0 && b < 0) {
            System.out.println(0);
            return;
        } else if (a >= 0 || c >= 0) {
            System.out.println(b * d);
            return;
        } else if (a < 0 && b > 0 && c < 0 && d > 0) {
            System.out.println(Math.max(a * c, b * d));
            return;
        } else {
            System.out.println(a * c);
            return;
        } a == 0 && d < 0 || c == 0 && b < 0 a == 0 && d < 0 a == 0 a 0 d < 0 d 0 c == 0 && b < 0 c == 0 c 0 b < 0 b 0 {
            System.out.println(0);
            return;
        } System.out.println(0) System.out.println System.out System System.out 0 return; if (a >= 0 || c >= 0) {
            System.out.println(b * d);
            return;
        } else if (a < 0 && b > 0 && c < 0 && d > 0) {
            System.out.println(Math.max(a * c, b * d));
            return;
        } else {
            System.out.println(a * c);
            return;
        } a >= 0 || c >= 0 a >= 0 a 0 c >= 0 c 0 {
            System.out.println(b * d);
            return;
        } System.out.println(b * d) System.out.println System.out System System.out b * d b d return; if (a < 0 && b > 0 && c < 0 && d > 0) {
            System.out.println(Math.max(a * c, b * d));
            return;
        } else {
            System.out.println(a * c);
            return;
        } a < 0 && b > 0 && c < 0 && d > 0 c < 0 a < 0 && b > 0 && c < 0 && d > 0 a < 0 a 0 b > 0 b 0 c < 0 c 0 d > 0 d 0 {
            System.out.println(Math.max(a * c, b * d));
            return;
        } System.out.println(Math.max(a * c, b * d)) System.out.println System.out System System.out Math.max(a * c, b * d) Math.max Math a * c a c b * d b d return; {
            System.out.println(a * c);
            return;
        } System.out.println(a * c) System.out.println System.out System System.out a * c a c return; String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long d = sc.nextLong();

        if (a == 0 && b == 0 || c == 0 && d == 0) {
            System.out.println(0);
            return;
        } else if (a > 0 && d < 0) {
            System.out.println(a * d);
            return;
        } else if (b < 0 && c > 0) {
            System.out.println(b * c);
            return;
        } else if (a == 0 && d < 0 || c == 0 && b < 0) {
            System.out.println(0);
            return;
        } else if (a >= 0 || c >= 0) {
            System.out.println(b * d);
            return;
        } else if (a < 0 && b > 0 && c < 0 && d > 0) {
            System.out.println(Math.max(a * c, b * d));
            return;
        } else {
            System.out.println(a * c);
            return;
        }

    }

} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long d = sc.nextLong();

        if (a == 0 && b == 0 || c == 0 && d == 0) {
            System.out.println(0);
            return;
        } else if (a > 0 && d < 0) {
            System.out.println(a * d);
            return;
        } else if (b < 0 && c > 0) {
            System.out.println(b * c);
            return;
        } else if (a == 0 && d < 0 || c == 0 && b < 0) {
            System.out.println(0);
            return;
        } else if (a >= 0 || c >= 0) {
            System.out.println(b * d);
            return;
        } else if (a < 0 && b > 0 && c < 0 && d > 0) {
            System.out.println(Math.max(a * c, b * d));
            return;
        } else {
            System.out.println(a * c);
            return;
        }

    }

} Main
import java.util.Scanner;

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

        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long d = sc.nextLong();

        if (a == 0 && b == 0 || c == 0 && d == 0) {
            System.out.println(0);
            return;
        } else if (a > 0 && d < 0) {
            System.out.println(a * d);
            return;
        } else if (b < 0 && c > 0) {
            System.out.println(b * c);
            return;
        } else if (a == 0 && d < 0 || c == 0 && b < 0) {
            System.out.println(0);
            return;
        } else if (a >= 0 || c >= 0) {
            System.out.println(b * d);
            return;
        } else if (a < 0 && b > 0 && c < 0 && d > 0) {
            System.out.println(Math.max(a * c, b * d));
            return;
        } else {
            System.out.println(a * c);
            return;
        }

    }

}
