import java.util.Scanner;

public class Main{
  public static void main(String args[]){
  Scanner scanner = new Scanner(System.in);
  long esu[];
  esu = new long[4];
    for(int i=0;i<4;i++){
        esu[i] = scanner.nextInt();   
   }

  long emu[];
  emu = new long[4];

    emu[0] = esu[0]*esu[2];
    emu[1] = esu[0]*esu[3];
    emu[2] = esu[1]*esu[2];
    emu[3] = esu[1]*esu[3];
    //System.out.println(emu[0]);


    long max = emu[0];
    for(int i=1;i<4;i++){
      if(emu[i]>max){
       max = emu[i];
      }
      else{
      }
    
    }

    
    
    
    
  System.out.println(max);
  }
} import java.util.Scanner; Scanner java.util public class Main{
  public static void main(String args[]){
  Scanner scanner = new Scanner(System.in);
  long esu[];
  esu = new long[4];
    for(int i=0;i<4;i++){
        esu[i] = scanner.nextInt();   
   }

  long emu[];
  emu = new long[4];

    emu[0] = esu[0]*esu[2];
    emu[1] = esu[0]*esu[3];
    emu[2] = esu[1]*esu[2];
    emu[3] = esu[1]*esu[3];
    //System.out.println(emu[0]);


    long max = emu[0];
    for(int i=1;i<4;i++){
      if(emu[i]>max){
       max = emu[i];
      }
      else{
      }
    
    }

    
    
    
    
  System.out.println(max);
  }
} Main public static void main(String args[]){
  Scanner scanner = new Scanner(System.in);
  long esu[];
  esu = new long[4];
    for(int i=0;i<4;i++){
        esu[i] = scanner.nextInt();   
   }

  long emu[];
  emu = new long[4];

    emu[0] = esu[0]*esu[2];
    emu[1] = esu[0]*esu[3];
    emu[2] = esu[1]*esu[2];
    emu[3] = esu[1]*esu[3];
    //System.out.println(emu[0]);


    long max = emu[0];
    for(int i=1;i<4;i++){
      if(emu[i]>max){
       max = emu[i];
      }
      else{
      }
    
    }

    
    
    
    
  System.out.println(max);
  } main {
  Scanner scanner = new Scanner(System.in);
  long esu[];
  esu = new long[4];
    for(int i=0;i<4;i++){
        esu[i] = scanner.nextInt();   
   }

  long emu[];
  emu = new long[4];

    emu[0] = esu[0]*esu[2];
    emu[1] = esu[0]*esu[3];
    emu[2] = esu[1]*esu[2];
    emu[3] = esu[1]*esu[3];
    //System.out.println(emu[0]);


    long max = emu[0];
    for(int i=1;i<4;i++){
      if(emu[i]>max){
       max = emu[i];
      }
      else{
      }
    
    }

    
    
    
    
  System.out.println(max);
  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) long esu[]; esu esu = new long[4] esu new long[4] 4 for(int i=0;i<4;i++){
        esu[i] = scanner.nextInt();   
   } int i=0; int i=0; i 0 i<4 i 4 i++ i++ i {
        esu[i] = scanner.nextInt();   
   } {
        esu[i] = scanner.nextInt();   
   } esu[i] = scanner.nextInt() esu[i] esu i scanner.nextInt() scanner.nextInt scanner long emu[]; emu emu = new long[4] emu new long[4] 4 emu[0] = esu[0]*esu[2] emu[0] emu 0 esu[0]*esu[2] esu[0] esu 0 esu[2] esu 2 emu[1] = esu[0]*esu[3] emu[1] emu 1 esu[0]*esu[3] esu[0] esu 0 esu[3] esu 3 emu[2] = esu[1]*esu[2] emu[2] emu 2 esu[1]*esu[2] esu[1] esu 1 esu[2] esu 2 emu[3] = esu[1]*esu[3] emu[3] emu 3 esu[1]*esu[3] esu[1] esu 1 esu[3] esu 3 long max = emu[0]; max emu[0] emu 0 for(int i=1;i<4;i++){
      if(emu[i]>max){
       max = emu[i];
      }
      else{
      }
    
    } int i=1; int i=1; i 1 i<4 i 4 i++ i++ i {
      if(emu[i]>max){
       max = emu[i];
      }
      else{
      }
    
    } {
      if(emu[i]>max){
       max = emu[i];
      }
      else{
      }
    
    } if(emu[i]>max){
       max = emu[i];
      }
      else{
      } emu[i]>max emu[i] emu i max {
       max = emu[i];
      } max = emu[i] max emu[i] emu i {
      } 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 scanner = new Scanner(System.in);
  long esu[];
  esu = new long[4];
    for(int i=0;i<4;i++){
        esu[i] = scanner.nextInt();   
   }

  long emu[];
  emu = new long[4];

    emu[0] = esu[0]*esu[2];
    emu[1] = esu[0]*esu[3];
    emu[2] = esu[1]*esu[2];
    emu[3] = esu[1]*esu[3];
    //System.out.println(emu[0]);


    long max = emu[0];
    for(int i=1;i<4;i++){
      if(emu[i]>max){
       max = emu[i];
      }
      else{
      }
    
    }

    
    
    
    
  System.out.println(max);
  }
} public class Main{
  public static void main(String args[]){
  Scanner scanner = new Scanner(System.in);
  long esu[];
  esu = new long[4];
    for(int i=0;i<4;i++){
        esu[i] = scanner.nextInt();   
   }

  long emu[];
  emu = new long[4];

    emu[0] = esu[0]*esu[2];
    emu[1] = esu[0]*esu[3];
    emu[2] = esu[1]*esu[2];
    emu[3] = esu[1]*esu[3];
    //System.out.println(emu[0]);


    long max = emu[0];
    for(int i=1;i<4;i++){
      if(emu[i]>max){
       max = emu[i];
      }
      else{
      }
    
    }

    
    
    
    
  System.out.println(max);
  }
} Main
import java.util.Scanner;

public class Main{
  public static void main(String args[]){
  Scanner scanner = new Scanner(System.in);
  long esu[];
  esu = new long[4];
    for(int i=0;i<4;i++){
        esu[i] = scanner.nextInt();   
   }

  long emu[];
  emu = new long[4];

    emu[0] = esu[0]*esu[2];
    emu[1] = esu[0]*esu[3];
    emu[2] = esu[1]*esu[2];
    emu[3] = esu[1]*esu[3];
    //System.out.println(emu[0]);


    long max = emu[0];
    for(int i=1;i<4;i++){
      if(emu[i]>max){
       max = emu[i];
      }
      else{
      }
    
    }

    
    
    
    
  System.out.println(max);
  }
}