import java.util.*;

public class Main {

    public static long x,y;
    public static void main(String [] args) {

        Scanner sc = new Scanner(System.in);

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

        long maxx = Math.max(a * c, a * d);
        long maxy = Math.max(b * c, b * d);
        long ans = Math.max(maxx, maxy);

        System.out.println(ans);

    }

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

    public static long x,y;
    public static void main(String [] args) {

        Scanner sc = new Scanner(System.in);

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

        long maxx = Math.max(a * c, a * d);
        long maxy = Math.max(b * c, b * d);
        long ans = Math.max(maxx, maxy);

        System.out.println(ans);

    }

} Main public static long x x y; y public static void main(String [] args) {

        Scanner sc = new Scanner(System.in);

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

        long maxx = Math.max(a * c, a * d);
        long maxy = Math.max(b * c, b * d);
        long ans = Math.max(maxx, maxy);

        System.out.println(ans);

    } main {

        Scanner sc = new Scanner(System.in);

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

        long maxx = Math.max(a * c, a * d);
        long maxy = Math.max(b * c, b * d);
        long ans = Math.max(maxx, maxy);

        System.out.println(ans);

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long a = sc.nextInt(); a sc.nextInt() sc.nextInt sc long b = sc.nextInt(); b sc.nextInt() sc.nextInt sc long c = sc.nextInt(); c sc.nextInt() sc.nextInt sc long d = sc.nextInt(); d sc.nextInt() sc.nextInt sc long maxx = Math.max(a * c, a * d); maxx Math.max(a * c, a * d) Math.max Math a * c a c a * d a d long maxy = Math.max(b * c, b * d); maxy Math.max(b * c, b * d) Math.max Math b * c b c b * d b d long ans = Math.max(maxx, maxy); ans Math.max(maxx, maxy) Math.max Math maxx maxy System.out.println(ans) System.out.println System.out System System.out ans String [] args args public class Main {

    public static long x,y;
    public static void main(String [] args) {

        Scanner sc = new Scanner(System.in);

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

        long maxx = Math.max(a * c, a * d);
        long maxy = Math.max(b * c, b * d);
        long ans = Math.max(maxx, maxy);

        System.out.println(ans);

    }

} public class Main {

    public static long x,y;
    public static void main(String [] args) {

        Scanner sc = new Scanner(System.in);

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

        long maxx = Math.max(a * c, a * d);
        long maxy = Math.max(b * c, b * d);
        long ans = Math.max(maxx, maxy);

        System.out.println(ans);

    }

} Main
import java.util.*;

public class Main {

    public static long x,y;
    public static void main(String [] args) {

        Scanner sc = new Scanner(System.in);

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

        long maxx = Math.max(a * c, a * d);
        long maxy = Math.max(b * c, b * d);
        long ans = Math.max(maxx, maxy);

        System.out.println(ans);

    }

}
