import java.util.*;


class Main{
    //ans
    public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
      long[] inp = new long[4]; 
      inp[0] = (long)sc.nextInt();
      inp[1] = (long)(long)sc.nextInt();
      inp[2] = (long)sc.nextInt();
      inp[3] = (long)sc.nextInt();
      long[] time = new long[4];
      int ti = 0;
      for(int i = 0;i<2;i++){
        for(int k = 2;k<4;k++){
          time[ti]=inp[i]*inp[k];
          ti++;
        }
      }
      long max = time[0];
      for(int i = 1;i<4;i++){
        if(time[i]>max){
          max = time[i];
        }
      }
      System.out.println(max);
    }
} import java.util.*; util.* java class Main{
    //ans
    public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
      long[] inp = new long[4]; 
      inp[0] = (long)sc.nextInt();
      inp[1] = (long)(long)sc.nextInt();
      inp[2] = (long)sc.nextInt();
      inp[3] = (long)sc.nextInt();
      long[] time = new long[4];
      int ti = 0;
      for(int i = 0;i<2;i++){
        for(int k = 2;k<4;k++){
          time[ti]=inp[i]*inp[k];
          ti++;
        }
      }
      long max = time[0];
      for(int i = 1;i<4;i++){
        if(time[i]>max){
          max = time[i];
        }
      }
      System.out.println(max);
    }
} Main //ans
    public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
      long[] inp = new long[4]; 
      inp[0] = (long)sc.nextInt();
      inp[1] = (long)(long)sc.nextInt();
      inp[2] = (long)sc.nextInt();
      inp[3] = (long)sc.nextInt();
      long[] time = new long[4];
      int ti = 0;
      for(int i = 0;i<2;i++){
        for(int k = 2;k<4;k++){
          time[ti]=inp[i]*inp[k];
          ti++;
        }
      }
      long max = time[0];
      for(int i = 1;i<4;i++){
        if(time[i]>max){
          max = time[i];
        }
      }
      System.out.println(max);
    } main {
	Scanner sc = new Scanner(System.in);
      long[] inp = new long[4]; 
      inp[0] = (long)sc.nextInt();
      inp[1] = (long)(long)sc.nextInt();
      inp[2] = (long)sc.nextInt();
      inp[3] = (long)sc.nextInt();
      long[] time = new long[4];
      int ti = 0;
      for(int i = 0;i<2;i++){
        for(int k = 2;k<4;k++){
          time[ti]=inp[i]*inp[k];
          ti++;
        }
      }
      long max = time[0];
      for(int i = 1;i<4;i++){
        if(time[i]>max){
          max = time[i];
        }
      }
      System.out.println(max);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long[] inp = new long[4]; inp new long[4] 4 inp[0] = (long)sc.nextInt() inp[0] inp 0 (long)sc.nextInt() sc.nextInt sc inp[1] = (long)(long)sc.nextInt() inp[1] inp 1 (long)(long)sc.nextInt() sc.nextInt sc inp[2] = (long)sc.nextInt() inp[2] inp 2 (long)sc.nextInt() sc.nextInt sc inp[3] = (long)sc.nextInt() inp[3] inp 3 (long)sc.nextInt() sc.nextInt sc long[] time = new long[4]; time new long[4] 4 int ti = 0; ti 0 for(int i = 0;i<2;i++){
        for(int k = 2;k<4;k++){
          time[ti]=inp[i]*inp[k];
          ti++;
        }
      } int i = 0; int i = 0; i 0 i<2 i 2 i++ i++ i {
        for(int k = 2;k<4;k++){
          time[ti]=inp[i]*inp[k];
          ti++;
        }
      } {
        for(int k = 2;k<4;k++){
          time[ti]=inp[i]*inp[k];
          ti++;
        }
      } for(int k = 2;k<4;k++){
          time[ti]=inp[i]*inp[k];
          ti++;
        } int k = 2; int k = 2; k 2 k<4 k 4 k++ k++ k {
          time[ti]=inp[i]*inp[k];
          ti++;
        } {
          time[ti]=inp[i]*inp[k];
          ti++;
        } time[ti]=inp[i]*inp[k] time[ti] time ti inp[i]*inp[k] inp[i] inp i inp[k] inp k ti++ ti long max = time[0]; max time[0] time 0 for(int i = 1;i<4;i++){
        if(time[i]>max){
          max = time[i];
        }
      } int i = 1; int i = 1; i 1 i<4 i 4 i++ i++ i {
        if(time[i]>max){
          max = time[i];
        }
      } {
        if(time[i]>max){
          max = time[i];
        }
      } if(time[i]>max){
          max = time[i];
        } time[i]>max time[i] time i max {
          max = time[i];
        } max = time[i] max time[i] time i System.out.println(max) System.out.println System.out System System.out max String[] args args
import java.util.*;


class Main{
    //ans
    public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
      long[] inp = new long[4]; 
      inp[0] = (long)sc.nextInt();
      inp[1] = (long)(long)sc.nextInt();
      inp[2] = (long)sc.nextInt();
      inp[3] = (long)sc.nextInt();
      long[] time = new long[4];
      int ti = 0;
      for(int i = 0;i<2;i++){
        for(int k = 2;k<4;k++){
          time[ti]=inp[i]*inp[k];
          ti++;
        }
      }
      long max = time[0];
      for(int i = 1;i<4;i++){
        if(time[i]>max){
          max = time[i];
        }
      }
      System.out.println(max);
    }
}