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();
    long ans=Long.MIN_VALUE;;
    long[] arr = new long[4];
    arr[0]=a*c;
    arr[1]=a*d;
    arr[2]=b*c;
    arr[3]=b*d;
    for(int i=0;i<4;i++){
      if(arr[i]>ans){
        ans=arr[i];
      }
    }
    System.out.println(ans);
  }
} 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();
    long ans=Long.MIN_VALUE;;
    long[] arr = new long[4];
    arr[0]=a*c;
    arr[1]=a*d;
    arr[2]=b*c;
    arr[3]=b*d;
    for(int i=0;i<4;i++){
      if(arr[i]>ans){
        ans=arr[i];
      }
    }
    System.out.println(ans);
  }
} 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();
    long ans=Long.MIN_VALUE;;
    long[] arr = new long[4];
    arr[0]=a*c;
    arr[1]=a*d;
    arr[2]=b*c;
    arr[3]=b*d;
    for(int i=0;i<4;i++){
      if(arr[i]>ans){
        ans=arr[i];
      }
    }
    System.out.println(ans);
  } main {
    Scanner sc = new Scanner(System.in);
    long a = sc.nextLong();
    long b = sc.nextLong();
    long c = sc.nextLong();
    long d = sc.nextLong();
    long ans=Long.MIN_VALUE;;
    long[] arr = new long[4];
    arr[0]=a*c;
    arr[1]=a*d;
    arr[2]=b*c;
    arr[3]=b*d;
    for(int i=0;i<4;i++){
      if(arr[i]>ans){
        ans=arr[i];
      }
    }
    System.out.println(ans);
  } 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 long ans=Long.MIN_VALUE; ans Long.MIN_VALUE Long Long.MIN_VALUE long[] arr = new long[4]; arr new long[4] 4 arr[0]=a*c arr[0] arr 0 a*c a c arr[1]=a*d arr[1] arr 1 a*d a d arr[2]=b*c arr[2] arr 2 b*c b c arr[3]=b*d arr[3] arr 3 b*d b d for(int i=0;i<4;i++){
      if(arr[i]>ans){
        ans=arr[i];
      }
    } int i=0; int i=0; i 0 i<4 i 4 i++ i++ i {
      if(arr[i]>ans){
        ans=arr[i];
      }
    } {
      if(arr[i]>ans){
        ans=arr[i];
      }
    } if(arr[i]>ans){
        ans=arr[i];
      } arr[i]>ans arr[i] arr i ans {
        ans=arr[i];
      } ans=arr[i] ans arr[i] arr i 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 a = sc.nextLong();
    long b = sc.nextLong();
    long c = sc.nextLong();
    long d = sc.nextLong();
    long ans=Long.MIN_VALUE;;
    long[] arr = new long[4];
    arr[0]=a*c;
    arr[1]=a*d;
    arr[2]=b*c;
    arr[3]=b*d;
    for(int i=0;i<4;i++){
      if(arr[i]>ans){
        ans=arr[i];
      }
    }
    System.out.println(ans);
  }
} 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();
    long ans=Long.MIN_VALUE;;
    long[] arr = new long[4];
    arr[0]=a*c;
    arr[1]=a*d;
    arr[2]=b*c;
    arr[3]=b*d;
    for(int i=0;i<4;i++){
      if(arr[i]>ans){
        ans=arr[i];
      }
    }
    System.out.println(ans);
  }
} 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();
    long ans=Long.MIN_VALUE;;
    long[] arr = new long[4];
    arr[0]=a*c;
    arr[1]=a*d;
    arr[2]=b*c;
    arr[3]=b*d;
    for(int i=0;i<4;i++){
      if(arr[i]>ans){
        ans=arr[i];
      }
    }
    System.out.println(ans);
  }
}