import java.util.Arrays;
import java.util.Scanner;

public class Main {      
        public static void main(String[] args) {
            Scanner in=new Scanner(System.in);
            long a=in.nextLong();
            long b=in.nextLong();
            long c=in.nextLong();
            long d=in.nextLong();
            long ar[]=new long[4];
            ar[0]=a*c;
            ar[1]=a*d;
            ar[2]=b*c;
            ar[3]=b*d;
            Arrays.sort(ar);
            
            System.out.println(ar[3]);
            
    }
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {      
        public static void main(String[] args) {
            Scanner in=new Scanner(System.in);
            long a=in.nextLong();
            long b=in.nextLong();
            long c=in.nextLong();
            long d=in.nextLong();
            long ar[]=new long[4];
            ar[0]=a*c;
            ar[1]=a*d;
            ar[2]=b*c;
            ar[3]=b*d;
            Arrays.sort(ar);
            
            System.out.println(ar[3]);
            
    }
} Main public static void main(String[] args) {
            Scanner in=new Scanner(System.in);
            long a=in.nextLong();
            long b=in.nextLong();
            long c=in.nextLong();
            long d=in.nextLong();
            long ar[]=new long[4];
            ar[0]=a*c;
            ar[1]=a*d;
            ar[2]=b*c;
            ar[3]=b*d;
            Arrays.sort(ar);
            
            System.out.println(ar[3]);
            
    } main {
            Scanner in=new Scanner(System.in);
            long a=in.nextLong();
            long b=in.nextLong();
            long c=in.nextLong();
            long d=in.nextLong();
            long ar[]=new long[4];
            ar[0]=a*c;
            ar[1]=a*d;
            ar[2]=b*c;
            ar[3]=b*d;
            Arrays.sort(ar);
            
            System.out.println(ar[3]);
            
    } Scanner in=new Scanner(System.in); in new Scanner(System.in) long a=in.nextLong(); a in.nextLong() in.nextLong in long b=in.nextLong(); b in.nextLong() in.nextLong in long c=in.nextLong(); c in.nextLong() in.nextLong in long d=in.nextLong(); d in.nextLong() in.nextLong in long ar[]=new long[4]; ar new long[4] 4 ar[0]=a*c ar[0] ar 0 a*c a c ar[1]=a*d ar[1] ar 1 a*d a d ar[2]=b*c ar[2] ar 2 b*c b c ar[3]=b*d ar[3] ar 3 b*d b d Arrays.sort(ar) Arrays.sort Arrays ar System.out.println(ar[3]) System.out.println System.out System System.out ar[3] ar 3 String[] args args public class Main {      
        public static void main(String[] args) {
            Scanner in=new Scanner(System.in);
            long a=in.nextLong();
            long b=in.nextLong();
            long c=in.nextLong();
            long d=in.nextLong();
            long ar[]=new long[4];
            ar[0]=a*c;
            ar[1]=a*d;
            ar[2]=b*c;
            ar[3]=b*d;
            Arrays.sort(ar);
            
            System.out.println(ar[3]);
            
    }
} public class Main {      
        public static void main(String[] args) {
            Scanner in=new Scanner(System.in);
            long a=in.nextLong();
            long b=in.nextLong();
            long c=in.nextLong();
            long d=in.nextLong();
            long ar[]=new long[4];
            ar[0]=a*c;
            ar[1]=a*d;
            ar[2]=b*c;
            ar[3]=b*d;
            Arrays.sort(ar);
            
            System.out.println(ar[3]);
            
    }
} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main {      
        public static void main(String[] args) {
            Scanner in=new Scanner(System.in);
            long a=in.nextLong();
            long b=in.nextLong();
            long c=in.nextLong();
            long d=in.nextLong();
            long ar[]=new long[4];
            ar[0]=a*c;
            ar[1]=a*d;
            ar[2]=b*c;
            ar[3]=b*d;
            Arrays.sort(ar);
            
            System.out.println(ar[3]);
            
    }
}
