import java.util.*;

public class Main {

    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 result[] = new long[4];
      	result[0] = a*c;
      	result[1] = a*d;
      	result[2] = b*c;
      	result[3] = b*d;
      
      	for(int i = 1;i < 4;i++){
         if(result[0] < result[i]){
         	result[0] = result[i];
         }
        }
      
      	System.out.print(result[0]);
    }
} import java.util.*; util.* java public class Main {

    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 result[] = new long[4];
      	result[0] = a*c;
      	result[1] = a*d;
      	result[2] = b*c;
      	result[3] = b*d;
      
      	for(int i = 1;i < 4;i++){
         if(result[0] < result[i]){
         	result[0] = result[i];
         }
        }
      
      	System.out.print(result[0]);
    }
} Main 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 result[] = new long[4];
      	result[0] = a*c;
      	result[1] = a*d;
      	result[2] = b*c;
      	result[3] = b*d;
      
      	for(int i = 1;i < 4;i++){
         if(result[0] < result[i]){
         	result[0] = result[i];
         }
        }
      
      	System.out.print(result[0]);
    } main {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextInt();
      	long b = sc.nextInt();
      	long c = sc.nextInt();
      	long d = sc.nextInt();
      	
      	long result[] = new long[4];
      	result[0] = a*c;
      	result[1] = a*d;
      	result[2] = b*c;
      	result[3] = b*d;
      
      	for(int i = 1;i < 4;i++){
         if(result[0] < result[i]){
         	result[0] = result[i];
         }
        }
      
      	System.out.print(result[0]);
    } 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 result[] = new long[4]; result new long[4] 4 result[0] = a*c result[0] result 0 a*c a c result[1] = a*d result[1] result 1 a*d a d result[2] = b*c result[2] result 2 b*c b c result[3] = b*d result[3] result 3 b*d b d for(int i = 1;i < 4;i++){
         if(result[0] < result[i]){
         	result[0] = result[i];
         }
        } int i = 1; int i = 1; i 1 i < 4 i 4 i++ i++ i {
         if(result[0] < result[i]){
         	result[0] = result[i];
         }
        } {
         if(result[0] < result[i]){
         	result[0] = result[i];
         }
        } if(result[0] < result[i]){
         	result[0] = result[i];
         } result[0] < result[i] result[0] result 0 result[i] result i {
         	result[0] = result[i];
         } result[0] = result[i] result[0] result 0 result[i] result i System.out.print(result[0]) System.out.print System.out System System.out result[0] result 0 String[] args args public class Main {

    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 result[] = new long[4];
      	result[0] = a*c;
      	result[1] = a*d;
      	result[2] = b*c;
      	result[3] = b*d;
      
      	for(int i = 1;i < 4;i++){
         if(result[0] < result[i]){
         	result[0] = result[i];
         }
        }
      
      	System.out.print(result[0]);
    }
} public class Main {

    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 result[] = new long[4];
      	result[0] = a*c;
      	result[1] = a*d;
      	result[2] = b*c;
      	result[3] = b*d;
      
      	for(int i = 1;i < 4;i++){
         if(result[0] < result[i]){
         	result[0] = result[i];
         }
        }
      
      	System.out.print(result[0]);
    }
} Main
import java.util.*;

public class Main {

    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 result[] = new long[4];
      	result[0] = a*c;
      	result[1] = a*d;
      	result[2] = b*c;
      	result[3] = b*d;
      
      	for(int i = 1;i < 4;i++){
         if(result[0] < result[i]){
         	result[0] = result[i];
         }
        }
      
      	System.out.print(result[0]);
    }
}