
import java.util.*;
public class Main
{
  public static void main(String args[])
  {
    Scanner sc=new Scanner(System.in);
   long a=sc.nextInt();
    long b=sc.nextInt();
    long c=sc.nextInt();
    long d=sc.nextInt();
    long arr[]=new long[4];
    arr[0]=a*c;
    arr[1]=a*d;
    arr[2]=b*c;
    arr[3]=b*d;
    Arrays.sort(arr);
    System.out.println(arr[3]);
    
  }
} import java.util.*; util.* java public class Main
{
  public static void main(String args[])
  {
    Scanner sc=new Scanner(System.in);
   long a=sc.nextInt();
    long b=sc.nextInt();
    long c=sc.nextInt();
    long d=sc.nextInt();
    long arr[]=new long[4];
    arr[0]=a*c;
    arr[1]=a*d;
    arr[2]=b*c;
    arr[3]=b*d;
    Arrays.sort(arr);
    System.out.println(arr[3]);
    
  }
} Main public static void main(String args[])
  {
    Scanner sc=new Scanner(System.in);
   long a=sc.nextInt();
    long b=sc.nextInt();
    long c=sc.nextInt();
    long d=sc.nextInt();
    long arr[]=new long[4];
    arr[0]=a*c;
    arr[1]=a*d;
    arr[2]=b*c;
    arr[3]=b*d;
    Arrays.sort(arr);
    System.out.println(arr[3]);
    
  } main {
    Scanner sc=new Scanner(System.in);
   long a=sc.nextInt();
    long b=sc.nextInt();
    long c=sc.nextInt();
    long d=sc.nextInt();
    long arr[]=new long[4];
    arr[0]=a*c;
    arr[1]=a*d;
    arr[2]=b*c;
    arr[3]=b*d;
    Arrays.sort(arr);
    System.out.println(arr[3]);
    
  } Scanner sc=new Scanner(System.in); sc new Scanner(System.in) long a=sc.nextInt(); a sc.nextInt() sc.nextInt sc long b=sc.nextInt(); b sc.nextInt() sc.nextInt sc long c=sc.nextInt(); c sc.nextInt() sc.nextInt sc long d=sc.nextInt(); d sc.nextInt() sc.nextInt sc 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 Arrays.sort(arr) Arrays.sort Arrays arr System.out.println(arr[3]) System.out.println System.out System System.out arr[3] arr 3 String args[] args public class Main
{
  public static void main(String args[])
  {
    Scanner sc=new Scanner(System.in);
   long a=sc.nextInt();
    long b=sc.nextInt();
    long c=sc.nextInt();
    long d=sc.nextInt();
    long arr[]=new long[4];
    arr[0]=a*c;
    arr[1]=a*d;
    arr[2]=b*c;
    arr[3]=b*d;
    Arrays.sort(arr);
    System.out.println(arr[3]);
    
  }
} public class Main
{
  public static void main(String args[])
  {
    Scanner sc=new Scanner(System.in);
   long a=sc.nextInt();
    long b=sc.nextInt();
    long c=sc.nextInt();
    long d=sc.nextInt();
    long arr[]=new long[4];
    arr[0]=a*c;
    arr[1]=a*d;
    arr[2]=b*c;
    arr[3]=b*d;
    Arrays.sort(arr);
    System.out.println(arr[3]);
    
  }
} Main

import java.util.*;
public class Main
{
  public static void main(String args[])
  {
    Scanner sc=new Scanner(System.in);
   long a=sc.nextInt();
    long b=sc.nextInt();
    long c=sc.nextInt();
    long d=sc.nextInt();
    long arr[]=new long[4];
    arr[0]=a*c;
    arr[1]=a*d;
    arr[2]=b*c;
    arr[3]=b*d;
    Arrays.sort(arr);
    System.out.println(arr[3]);
    
  }
}
