import java.util.*;
 
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    long a = sc.nextLong();
    long b = sc.nextLong();
    long c = sc.nextLong();
    long d = sc.nextLong();
    ArrayList<Long> array = new ArrayList<Long>();
    array.add(a * c);
    array.add(a * d);
    array.add(b * c);
    array.add(b * d);
    long max = array.get(0);
    for(Long i : array){
      if(max < i){
        max = i;
      }
    }
    
    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 a = sc.nextLong();
    long b = sc.nextLong();
    long c = sc.nextLong();
    long d = sc.nextLong();
    ArrayList<Long> array = new ArrayList<Long>();
    array.add(a * c);
    array.add(a * d);
    array.add(b * c);
    array.add(b * d);
    long max = array.get(0);
    for(Long i : array){
      if(max < i){
        max = i;
      }
    }
    
    System.out.println(max);
    
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    long a = sc.nextLong();
    long b = sc.nextLong();
    long c = sc.nextLong();
    long d = sc.nextLong();
    ArrayList<Long> array = new ArrayList<Long>();
    array.add(a * c);
    array.add(a * d);
    array.add(b * c);
    array.add(b * d);
    long max = array.get(0);
    for(Long i : array){
      if(max < i){
        max = i;
      }
    }
    
    System.out.println(max);
    
  } main {
    Scanner sc = new Scanner(System.in);
    long a = sc.nextLong();
    long b = sc.nextLong();
    long c = sc.nextLong();
    long d = sc.nextLong();
    ArrayList<Long> array = new ArrayList<Long>();
    array.add(a * c);
    array.add(a * d);
    array.add(b * c);
    array.add(b * d);
    long max = array.get(0);
    for(Long i : array){
      if(max < i){
        max = i;
      }
    }
    
    System.out.println(max);
    
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long a = sc.nextLong(); a sc.nextLong() sc.nextLong sc long b = sc.nextLong(); b sc.nextLong() sc.nextLong sc long c = sc.nextLong(); c sc.nextLong() sc.nextLong sc long d = sc.nextLong(); d sc.nextLong() sc.nextLong sc ArrayList<Long> array = new ArrayList<Long>(); array new ArrayList<Long>() array.add(a * c) array.add array a * c a c array.add(a * d) array.add array a * d a d array.add(b * c) array.add array b * c b c array.add(b * d) array.add array b * d b d long max = array.get(0); max array.get(0) array.get array 0 for(Long i : array){
      if(max < i){
        max = i;
      }
    } Long i array {
      if(max < i){
        max = i;
      }
    } {
      if(max < i){
        max = i;
      }
    } if(max < i){
        max = i;
      } max < i max i {
        max = i;
      } max = i max 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 sc = new Scanner(System.in);
    long a = sc.nextLong();
    long b = sc.nextLong();
    long c = sc.nextLong();
    long d = sc.nextLong();
    ArrayList<Long> array = new ArrayList<Long>();
    array.add(a * c);
    array.add(a * d);
    array.add(b * c);
    array.add(b * d);
    long max = array.get(0);
    for(Long i : array){
      if(max < i){
        max = i;
      }
    }
    
    System.out.println(max);
    
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    long a = sc.nextLong();
    long b = sc.nextLong();
    long c = sc.nextLong();
    long d = sc.nextLong();
    ArrayList<Long> array = new ArrayList<Long>();
    array.add(a * c);
    array.add(a * d);
    array.add(b * c);
    array.add(b * d);
    long max = array.get(0);
    for(Long i : array){
      if(max < i){
        max = i;
      }
    }
    
    System.out.println(max);
    
  }
} Main
import java.util.*;
 
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    long a = sc.nextLong();
    long b = sc.nextLong();
    long c = sc.nextLong();
    long d = sc.nextLong();
    ArrayList<Long> array = new ArrayList<Long>();
    array.add(a * c);
    array.add(a * d);
    array.add(b * c);
    array.add(b * d);
    long max = array.get(0);
    for(Long i : array){
      if(max < i){
        max = i;
      }
    }
    
    System.out.println(max);
    
  }
}