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 e =a*c;
    long f =b*d;
    long g =a*d;
    long h =b*c;
    long ans =Math.max(e,f);
    ans =Math.max(ans,g);
    ans =Math.max(ans,h);
    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 e =a*c;
    long f =b*d;
    long g =a*d;
    long h =b*c;
    long ans =Math.max(e,f);
    ans =Math.max(ans,g);
    ans =Math.max(ans,h);
    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 e =a*c;
    long f =b*d;
    long g =a*d;
    long h =b*c;
    long ans =Math.max(e,f);
    ans =Math.max(ans,g);
    ans =Math.max(ans,h);
    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 e =a*c;
    long f =b*d;
    long g =a*d;
    long h =b*c;
    long ans =Math.max(e,f);
    ans =Math.max(ans,g);
    ans =Math.max(ans,h);
    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 e =a*c; e a*c a c long f =b*d; f b*d b d long g =a*d; g a*d a d long h =b*c; h b*c b c long ans =Math.max(e,f); ans Math.max(e,f) Math.max Math e f ans =Math.max(ans,g) ans Math.max(ans,g) Math.max Math ans g ans =Math.max(ans,h) ans Math.max(ans,h) Math.max Math ans h 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 e =a*c;
    long f =b*d;
    long g =a*d;
    long h =b*c;
    long ans =Math.max(e,f);
    ans =Math.max(ans,g);
    ans =Math.max(ans,h);
    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 e =a*c;
    long f =b*d;
    long g =a*d;
    long h =b*c;
    long ans =Math.max(e,f);
    ans =Math.max(ans,g);
    ans =Math.max(ans,h);
    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 e =a*c;
    long f =b*d;
    long g =a*d;
    long h =b*c;
    long ans =Math.max(e,f);
    ans =Math.max(ans,g);
    ans =Math.max(ans,h);
    System.out.println(ans);
  }
}