import java.util.*;
class Main{
  public static void main(String args[]){
    Scanner scan = new Scanner(System.in);
	long a=scan.nextInt(),b=scan.nextInt(),c=scan.nextInt(),d=scan.nextInt();
    long  x1,x2;
    x1=Math.max(a*c,a*d);
    x2=Math.max(b*c,b*d);
    x1=Math.max(x1,x2);
    System.out.println(x1);
  }
} import java.util.*; util.* java class Main{
  public static void main(String args[]){
    Scanner scan = new Scanner(System.in);
	long a=scan.nextInt(),b=scan.nextInt(),c=scan.nextInt(),d=scan.nextInt();
    long  x1,x2;
    x1=Math.max(a*c,a*d);
    x2=Math.max(b*c,b*d);
    x1=Math.max(x1,x2);
    System.out.println(x1);
  }
} Main public static void main(String args[]){
    Scanner scan = new Scanner(System.in);
	long a=scan.nextInt(),b=scan.nextInt(),c=scan.nextInt(),d=scan.nextInt();
    long  x1,x2;
    x1=Math.max(a*c,a*d);
    x2=Math.max(b*c,b*d);
    x1=Math.max(x1,x2);
    System.out.println(x1);
  } main {
    Scanner scan = new Scanner(System.in);
	long a=scan.nextInt(),b=scan.nextInt(),c=scan.nextInt(),d=scan.nextInt();
    long  x1,x2;
    x1=Math.max(a*c,a*d);
    x2=Math.max(b*c,b*d);
    x1=Math.max(x1,x2);
    System.out.println(x1);
  } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) long a=scan.nextInt() a scan.nextInt() scan.nextInt scan b=scan.nextInt() b scan.nextInt() scan.nextInt scan c=scan.nextInt() c scan.nextInt() scan.nextInt scan d=scan.nextInt(); d scan.nextInt() scan.nextInt scan long  x1 x1 x2; x2 x1=Math.max(a*c,a*d) x1 Math.max(a*c,a*d) Math.max Math a*c a c a*d a d x2=Math.max(b*c,b*d) x2 Math.max(b*c,b*d) Math.max Math b*c b c b*d b d x1=Math.max(x1,x2) x1 Math.max(x1,x2) Math.max Math x1 x2 System.out.println(x1) System.out.println System.out System System.out x1 String args[] args
import java.util.*;
class Main{
  public static void main(String args[]){
    Scanner scan = new Scanner(System.in);
	long a=scan.nextInt(),b=scan.nextInt(),c=scan.nextInt(),d=scan.nextInt();
    long  x1,x2;
    x1=Math.max(a*c,a*d);
    x2=Math.max(b*c,b*d);
    x1=Math.max(x1,x2);
    System.out.println(x1);
  }
}