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();
        
        long a1 = a * c;
        long a2 = a * d;
        long a3 = b * c;
        long a4 = b * d;
                
        long b1 = Math.max(a1, a2);
        long b2 = Math.max(a3, a4);
        long ans = Math.max(b1, b2);
        
        System.out.println(ans);      
        
    }
} 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();
        
        long a1 = a * c;
        long a2 = a * d;
        long a3 = b * c;
        long a4 = b * d;
                
        long b1 = Math.max(a1, a2);
        long b2 = Math.max(a3, a4);
        long ans = Math.max(b1, b2);
        
        System.out.println(ans);      
        
    }
} 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();
        
        long a1 = a * c;
        long a2 = a * d;
        long a3 = b * c;
        long a4 = b * d;
                
        long b1 = Math.max(a1, a2);
        long b2 = Math.max(a3, a4);
        long ans = Math.max(b1, b2);
        
        System.out.println(ans);      
        
    } main {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long d = sc.nextLong();
        
        long a1 = a * c;
        long a2 = a * d;
        long a3 = b * c;
        long a4 = b * d;
                
        long b1 = Math.max(a1, a2);
        long b2 = Math.max(a3, a4);
        long ans = Math.max(b1, b2);
        
        System.out.println(ans);      
        
    } 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 long a1 = a * c; a1 a * c a c long a2 = a * d; a2 a * d a d long a3 = b * c; a3 b * c b c long a4 = b * d; a4 b * d b d long b1 = Math.max(a1, a2); b1 Math.max(a1, a2) Math.max Math a1 a2 long b2 = Math.max(a3, a4); b2 Math.max(a3, a4) Math.max Math a3 a4 long ans = Math.max(b1, b2); ans Math.max(b1, b2) Math.max Math b1 b2 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 sc = new Scanner(System.in);
        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long d = sc.nextLong();
        
        long a1 = a * c;
        long a2 = a * d;
        long a3 = b * c;
        long a4 = b * d;
                
        long b1 = Math.max(a1, a2);
        long b2 = Math.max(a3, a4);
        long ans = Math.max(b1, b2);
        
        System.out.println(ans);      
        
    }
} 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();
        
        long a1 = a * c;
        long a2 = a * d;
        long a3 = b * c;
        long a4 = b * d;
                
        long b1 = Math.max(a1, a2);
        long b2 = Math.max(a3, a4);
        long ans = Math.max(b1, b2);
        
        System.out.println(ans);      
        
    }
} 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();
        
        long a1 = a * c;
        long a2 = a * d;
        long a3 = b * c;
        long a4 = b * d;
                
        long b1 = Math.max(a1, a2);
        long b2 = Math.max(a3, a4);
        long ans = Math.max(b1, b2);
        
        System.out.println(ans);      
        
    }
}