import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextInt();
        long b = sc.nextInt();
        long c = sc.nextInt();
        long d = sc.nextInt();

        long x =   Math.max(a*c, a*d);
        long y =   Math.max(b*c, b*d);
        long z =   Math.max(x, y);
        
        System.out.println(z);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextInt();
        long b = sc.nextInt();
        long c = sc.nextInt();
        long d = sc.nextInt();

        long x =   Math.max(a*c, a*d);
        long y =   Math.max(b*c, b*d);
        long z =   Math.max(x, y);
        
        System.out.println(z);
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextInt();
        long b = sc.nextInt();
        long c = sc.nextInt();
        long d = sc.nextInt();

        long x =   Math.max(a*c, a*d);
        long y =   Math.max(b*c, b*d);
        long z =   Math.max(x, y);
        
        System.out.println(z);
    } main {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextInt();
        long b = sc.nextInt();
        long c = sc.nextInt();
        long d = sc.nextInt();

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

        long x =   Math.max(a*c, a*d);
        long y =   Math.max(b*c, b*d);
        long z =   Math.max(x, y);
        
        System.out.println(z);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextInt();
        long b = sc.nextInt();
        long c = sc.nextInt();
        long d = sc.nextInt();

        long x =   Math.max(a*c, a*d);
        long y =   Math.max(b*c, b*d);
        long z =   Math.max(x, y);
        
        System.out.println(z);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextInt();
        long b = sc.nextInt();
        long c = sc.nextInt();
        long d = sc.nextInt();

        long x =   Math.max(a*c, a*d);
        long y =   Math.max(b*c, b*d);
        long z =   Math.max(x, y);
        
        System.out.println(z);
    }
}
