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 h = a*c;
    long i = a*d;
    long j = b*c;
    long k = b*d;
    
    long x = Math.max(h,i);
    long y = Math.max(j,k);
    long z = Math.max(x,y);
    
    System.out.println(z);
  }
}
    
    
     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 h = a*c;
    long i = a*d;
    long j = b*c;
    long k = b*d;
    
    long x = Math.max(h,i);
    long y = Math.max(j,k);
    long z = Math.max(x,y);
    
    System.out.println(z);
  }
} 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 h = a*c;
    long i = a*d;
    long j = b*c;
    long k = b*d;
    
    long x = Math.max(h,i);
    long y = Math.max(j,k);
    long z = Math.max(x,y);
    
    System.out.println(z);
  } main {

    Scanner sc = new Scanner(System.in);
    
    long a = sc.nextLong();
    long b = sc.nextLong();
    long c = sc.nextLong();
    long d = sc.nextLong();
    
    long h = a*c;
    long i = a*d;
    long j = b*c;
    long k = b*d;
    
    long x = Math.max(h,i);
    long y = Math.max(j,k);
    long z = Math.max(x,y);
    
    System.out.println(z);
  } 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 h = a*c; h a*c a c long i = a*d; i a*d a d long j = b*c; j b*c b c long k = b*d; k b*d b d long x = Math.max(h,i); x Math.max(h,i) Math.max Math h i long y = Math.max(j,k); y Math.max(j,k) Math.max Math j k long z = Math.max(x,y); z Math.max(x,y) Math.max Math x y System.out.println(z) System.out.println System.out System System.out z 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 h = a*c;
    long i = a*d;
    long j = b*c;
    long k = b*d;
    
    long x = Math.max(h,i);
    long y = Math.max(j,k);
    long z = Math.max(x,y);
    
    System.out.println(z);
  }
} 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 h = a*c;
    long i = a*d;
    long j = b*c;
    long k = b*d;
    
    long x = Math.max(h,i);
    long y = Math.max(j,k);
    long z = Math.max(x,y);
    
    System.out.println(z);
  }
} 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 h = a*c;
    long i = a*d;
    long j = b*c;
    long k = b*d;
    
    long x = Math.max(h,i);
    long y = Math.max(j,k);
    long z = Math.max(x,y);
    
    System.out.println(z);
  }
}
    
    
    