import java.util.Scanner;

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

        long tmpA = sc.nextLong();
        long tmpB = sc.nextLong();
        long tmpC = sc.nextLong();
        long tmpD = sc.nextLong();
        long a = Math.max(tmpA * tmpC, tmpA * tmpD);
        long b = Math.max(tmpB * tmpC, tmpB * tmpD);

        System.out.println(Math.max(a, b));

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

        long tmpA = sc.nextLong();
        long tmpB = sc.nextLong();
        long tmpC = sc.nextLong();
        long tmpD = sc.nextLong();
        long a = Math.max(tmpA * tmpC, tmpA * tmpD);
        long b = Math.max(tmpB * tmpC, tmpB * tmpD);

        System.out.println(Math.max(a, b));

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

        long tmpA = sc.nextLong();
        long tmpB = sc.nextLong();
        long tmpC = sc.nextLong();
        long tmpD = sc.nextLong();
        long a = Math.max(tmpA * tmpC, tmpA * tmpD);
        long b = Math.max(tmpB * tmpC, tmpB * tmpD);

        System.out.println(Math.max(a, b));

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

        long tmpA = sc.nextLong();
        long tmpB = sc.nextLong();
        long tmpC = sc.nextLong();
        long tmpD = sc.nextLong();
        long a = Math.max(tmpA * tmpC, tmpA * tmpD);
        long b = Math.max(tmpB * tmpC, tmpB * tmpD);

        System.out.println(Math.max(a, b));

        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long tmpA = sc.nextLong(); tmpA sc.nextLong() sc.nextLong sc long tmpB = sc.nextLong(); tmpB sc.nextLong() sc.nextLong sc long tmpC = sc.nextLong(); tmpC sc.nextLong() sc.nextLong sc long tmpD = sc.nextLong(); tmpD sc.nextLong() sc.nextLong sc long a = Math.max(tmpA * tmpC, tmpA * tmpD); a Math.max(tmpA * tmpC, tmpA * tmpD) Math.max Math tmpA * tmpC tmpA tmpC tmpA * tmpD tmpA tmpD long b = Math.max(tmpB * tmpC, tmpB * tmpD); b Math.max(tmpB * tmpC, tmpB * tmpD) Math.max Math tmpB * tmpC tmpB tmpC tmpB * tmpD tmpB tmpD System.out.println(Math.max(a, b)) System.out.println System.out System System.out Math.max(a, b) Math.max Math a b sc.close() sc.close sc String... args args public class Main {
    public static void main(String... args) {
        Scanner sc = new Scanner(System.in);

        long tmpA = sc.nextLong();
        long tmpB = sc.nextLong();
        long tmpC = sc.nextLong();
        long tmpD = sc.nextLong();
        long a = Math.max(tmpA * tmpC, tmpA * tmpD);
        long b = Math.max(tmpB * tmpC, tmpB * tmpD);

        System.out.println(Math.max(a, b));

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

        long tmpA = sc.nextLong();
        long tmpB = sc.nextLong();
        long tmpC = sc.nextLong();
        long tmpD = sc.nextLong();
        long a = Math.max(tmpA * tmpC, tmpA * tmpD);
        long b = Math.max(tmpB * tmpC, tmpB * tmpD);

        System.out.println(Math.max(a, b));

        sc.close();
    }
} Main
import java.util.Scanner;

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

        long tmpA = sc.nextLong();
        long tmpB = sc.nextLong();
        long tmpC = sc.nextLong();
        long tmpD = sc.nextLong();
        long a = Math.max(tmpA * tmpC, tmpA * tmpD);
        long b = Math.max(tmpB * tmpC, tmpB * tmpD);

        System.out.println(Math.max(a, b));

        sc.close();
    }
}