import java.util.*;
import java.lang.Math;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      	long nums[] = new long[4];
      	long ans;
      	long lstack;
  
      	for(int i = 0;i < 4;i++) nums[i] = sc.nextLong();
      	ans = nums[0] * nums[2];
      	for(int i = 0;i < 2;i++){
          for(int j = 0;j < 2;j++){
      		lstack = nums[i]*nums[2+j];
            if(lstack > ans) ans = lstack;
          }
        }
           
      	System.out.println(ans);
        
	}
} import java.util.*; util.* java import java.lang.Math; Math java.lang public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      	long nums[] = new long[4];
      	long ans;
      	long lstack;
  
      	for(int i = 0;i < 4;i++) nums[i] = sc.nextLong();
      	ans = nums[0] * nums[2];
      	for(int i = 0;i < 2;i++){
          for(int j = 0;j < 2;j++){
      		lstack = nums[i]*nums[2+j];
            if(lstack > ans) ans = lstack;
          }
        }
           
      	System.out.println(ans);
        
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      	long nums[] = new long[4];
      	long ans;
      	long lstack;
  
      	for(int i = 0;i < 4;i++) nums[i] = sc.nextLong();
      	ans = nums[0] * nums[2];
      	for(int i = 0;i < 2;i++){
          for(int j = 0;j < 2;j++){
      		lstack = nums[i]*nums[2+j];
            if(lstack > ans) ans = lstack;
          }
        }
           
      	System.out.println(ans);
        
	} main {
		Scanner sc = new Scanner(System.in);
      	long nums[] = new long[4];
      	long ans;
      	long lstack;
  
      	for(int i = 0;i < 4;i++) nums[i] = sc.nextLong();
      	ans = nums[0] * nums[2];
      	for(int i = 0;i < 2;i++){
          for(int j = 0;j < 2;j++){
      		lstack = nums[i]*nums[2+j];
            if(lstack > ans) ans = lstack;
          }
        }
           
      	System.out.println(ans);
        
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long nums[] = new long[4]; nums new long[4] 4 long ans; ans long lstack; lstack for(int i = 0;i < 4;i++) nums[i] = sc.nextLong(); int i = 0; int i = 0; i 0 i < 4 i 4 i++ i++ i nums[i] = sc.nextLong(); nums[i] = sc.nextLong() nums[i] nums i sc.nextLong() sc.nextLong sc ans = nums[0] * nums[2] ans nums[0] * nums[2] nums[0] nums 0 nums[2] nums 2 for(int i = 0;i < 2;i++){
          for(int j = 0;j < 2;j++){
      		lstack = nums[i]*nums[2+j];
            if(lstack > ans) ans = lstack;
          }
        } int i = 0; int i = 0; i 0 i < 2 i 2 i++ i++ i {
          for(int j = 0;j < 2;j++){
      		lstack = nums[i]*nums[2+j];
            if(lstack > ans) ans = lstack;
          }
        } {
          for(int j = 0;j < 2;j++){
      		lstack = nums[i]*nums[2+j];
            if(lstack > ans) ans = lstack;
          }
        } for(int j = 0;j < 2;j++){
      		lstack = nums[i]*nums[2+j];
            if(lstack > ans) ans = lstack;
          } int j = 0; int j = 0; j 0 j < 2 j 2 j++ j++ j {
      		lstack = nums[i]*nums[2+j];
            if(lstack > ans) ans = lstack;
          } {
      		lstack = nums[i]*nums[2+j];
            if(lstack > ans) ans = lstack;
          } lstack = nums[i]*nums[2+j] lstack nums[i]*nums[2+j] nums[i] nums i nums[2+j] nums 2+j 2 j if(lstack > ans) ans = lstack; lstack > ans lstack ans ans = lstack ans lstack 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 nums[] = new long[4];
      	long ans;
      	long lstack;
  
      	for(int i = 0;i < 4;i++) nums[i] = sc.nextLong();
      	ans = nums[0] * nums[2];
      	for(int i = 0;i < 2;i++){
          for(int j = 0;j < 2;j++){
      		lstack = nums[i]*nums[2+j];
            if(lstack > ans) ans = lstack;
          }
        }
           
      	System.out.println(ans);
        
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      	long nums[] = new long[4];
      	long ans;
      	long lstack;
  
      	for(int i = 0;i < 4;i++) nums[i] = sc.nextLong();
      	ans = nums[0] * nums[2];
      	for(int i = 0;i < 2;i++){
          for(int j = 0;j < 2;j++){
      		lstack = nums[i]*nums[2+j];
            if(lstack > ans) ans = lstack;
          }
        }
           
      	System.out.println(ans);
        
	}
} Main
import java.util.*;
import java.lang.Math;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      	long nums[] = new long[4];
      	long ans;
      	long lstack;
  
      	for(int i = 0;i < 4;i++) nums[i] = sc.nextLong();
      	ans = nums[0] * nums[2];
      	for(int i = 0;i < 2;i++){
          for(int j = 0;j < 2;j++){
      		lstack = nums[i]*nums[2+j];
            if(lstack > ans) ans = lstack;
          }
        }
           
      	System.out.println(ans);
        
	}
}
