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