            import java.util.*;
            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 x = a * c;
                long y = a * d;
                long z = b * c;
                long w = b * d;
                long[] aa = new long[4];
                
                aa[0] = x;
                aa[1] = y;
                aa[2] = z;
                aa[3] = w;
                long max = x;
             
                for(int i = 0; i < 4; i++){
                  if(aa[i] > max){
                    max = aa[i];
                  }
                }
                System.out.println(max);
              }
            } import java.util.*; util.* java 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 x = a * c;
                long y = a * d;
                long z = b * c;
                long w = b * d;
                long[] aa = new long[4];
                
                aa[0] = x;
                aa[1] = y;
                aa[2] = z;
                aa[3] = w;
                long max = x;
             
                for(int i = 0; i < 4; i++){
                  if(aa[i] > max){
                    max = aa[i];
                  }
                }
                System.out.println(max);
              }
            } 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 x = a * c;
                long y = a * d;
                long z = b * c;
                long w = b * d;
                long[] aa = new long[4];
                
                aa[0] = x;
                aa[1] = y;
                aa[2] = z;
                aa[3] = w;
                long max = x;
             
                for(int i = 0; i < 4; i++){
                  if(aa[i] > max){
                    max = aa[i];
                  }
                }
                System.out.println(max);
              } main {
                Scanner sc = new Scanner(System.in);
                long a = sc.nextLong();
                long b = sc.nextLong();
                long c = sc.nextLong();
                long d = sc.nextLong();
                
                long x = a * c;
                long y = a * d;
                long z = b * c;
                long w = b * d;
                long[] aa = new long[4];
                
                aa[0] = x;
                aa[1] = y;
                aa[2] = z;
                aa[3] = w;
                long max = x;
             
                for(int i = 0; i < 4; i++){
                  if(aa[i] > max){
                    max = aa[i];
                  }
                }
                System.out.println(max);
              } 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 x = a * c; x a * c a c long y = a * d; y a * d a d long z = b * c; z b * c b c long w = b * d; w b * d b d long[] aa = new long[4]; aa new long[4] 4 aa[0] = x aa[0] aa 0 x aa[1] = y aa[1] aa 1 y aa[2] = z aa[2] aa 2 z aa[3] = w aa[3] aa 3 w long max = x; max x for(int i = 0; i < 4; i++){
                  if(aa[i] > max){
                    max = aa[i];
                  }
                } int i = 0; int i = 0; i 0 i < 4 i 4 i++ i++ i {
                  if(aa[i] > max){
                    max = aa[i];
                  }
                } {
                  if(aa[i] > max){
                    max = aa[i];
                  }
                } if(aa[i] > max){
                    max = aa[i];
                  } aa[i] > max aa[i] aa i max {
                    max = aa[i];
                  } max = aa[i] max aa[i] aa i System.out.println(max) System.out.println System.out System System.out max String[] args args
            import java.util.*;
            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 x = a * c;
                long y = a * d;
                long z = b * c;
                long w = b * d;
                long[] aa = new long[4];
                
                aa[0] = x;
                aa[1] = y;
                aa[2] = z;
                aa[3] = w;
                long max = x;
             
                for(int i = 0; i < 4; i++){
                  if(aa[i] > max){
                    max = aa[i];
                  }
                }
                System.out.println(max);
              }
            }