import java.util.Scanner;
 
class Main{
 public static void main(String[] args){
   Scanner scanner = new Scanner(System.in);
   long a = (long)scanner.nextInt();
   long b = (long)scanner.nextInt();
   long c = (long)scanner.nextInt();
   long d = (long)scanner.nextInt();
   
   long[] e= new long[]{a*c,a*d,b*c,b*d};
   
   long num = e[0];
   
   for(int i=1;i<4;i++) if(num < e[i]) num = e[i];
   
   System.out.println(num);
   
 }
   
} import java.util.Scanner; Scanner java.util class Main{
 public static void main(String[] args){
   Scanner scanner = new Scanner(System.in);
   long a = (long)scanner.nextInt();
   long b = (long)scanner.nextInt();
   long c = (long)scanner.nextInt();
   long d = (long)scanner.nextInt();
   
   long[] e= new long[]{a*c,a*d,b*c,b*d};
   
   long num = e[0];
   
   for(int i=1;i<4;i++) if(num < e[i]) num = e[i];
   
   System.out.println(num);
   
 }
   
} Main public static void main(String[] args){
   Scanner scanner = new Scanner(System.in);
   long a = (long)scanner.nextInt();
   long b = (long)scanner.nextInt();
   long c = (long)scanner.nextInt();
   long d = (long)scanner.nextInt();
   
   long[] e= new long[]{a*c,a*d,b*c,b*d};
   
   long num = e[0];
   
   for(int i=1;i<4;i++) if(num < e[i]) num = e[i];
   
   System.out.println(num);
   
 } main {
   Scanner scanner = new Scanner(System.in);
   long a = (long)scanner.nextInt();
   long b = (long)scanner.nextInt();
   long c = (long)scanner.nextInt();
   long d = (long)scanner.nextInt();
   
   long[] e= new long[]{a*c,a*d,b*c,b*d};
   
   long num = e[0];
   
   for(int i=1;i<4;i++) if(num < e[i]) num = e[i];
   
   System.out.println(num);
   
 } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) long a = (long)scanner.nextInt(); a (long)scanner.nextInt() scanner.nextInt scanner long b = (long)scanner.nextInt(); b (long)scanner.nextInt() scanner.nextInt scanner long c = (long)scanner.nextInt(); c (long)scanner.nextInt() scanner.nextInt scanner long d = (long)scanner.nextInt(); d (long)scanner.nextInt() scanner.nextInt scanner long[] e= new long[]{a*c,a*d,b*c,b*d}; e new long[]{a*c,a*d,b*c,b*d} long num = e[0]; num e[0] e 0 for(int i=1;i<4;i++) if(num < e[i]) num = e[i]; int i=1; int i=1; i 1 i<4 i 4 i++ i++ i if(num < e[i]) num = e[i]; if(num < e[i]) num = e[i]; num < e[i] num e[i] e i num = e[i] num e[i] e i System.out.println(num) System.out.println System.out System System.out num String[] args args
import java.util.Scanner;
 
class Main{
 public static void main(String[] args){
   Scanner scanner = new Scanner(System.in);
   long a = (long)scanner.nextInt();
   long b = (long)scanner.nextInt();
   long c = (long)scanner.nextInt();
   long d = (long)scanner.nextInt();
   
   long[] e= new long[]{a*c,a*d,b*c,b*d};
   
   long num = e[0];
   
   for(int i=1;i<4;i++) if(num < e[i]) num = e[i];
   
   System.out.println(num);
   
 }
   
}