import java.util.*;
public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		long a=sc.nextInt();
		long b=sc.nextInt();
		long c=sc.nextInt();
		long d=sc.nextInt();
		long[] xy=new long[4];
		xy[0]=a*c;
		xy[1]=a*d;
		xy[2]=b*c;
		xy[3]=b*d;
		long ans=xy[0];
		for(int i=0;i<4;i++){
			ans=Math.max(xy[i],ans);
		}
		System.out.println(ans);
	}
} import java.util.*; util.* java public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		long a=sc.nextInt();
		long b=sc.nextInt();
		long c=sc.nextInt();
		long d=sc.nextInt();
		long[] xy=new long[4];
		xy[0]=a*c;
		xy[1]=a*d;
		xy[2]=b*c;
		xy[3]=b*d;
		long ans=xy[0];
		for(int i=0;i<4;i++){
			ans=Math.max(xy[i],ans);
		}
		System.out.println(ans);
	}
} Main public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		long a=sc.nextInt();
		long b=sc.nextInt();
		long c=sc.nextInt();
		long d=sc.nextInt();
		long[] xy=new long[4];
		xy[0]=a*c;
		xy[1]=a*d;
		xy[2]=b*c;
		xy[3]=b*d;
		long ans=xy[0];
		for(int i=0;i<4;i++){
			ans=Math.max(xy[i],ans);
		}
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		long a=sc.nextInt();
		long b=sc.nextInt();
		long c=sc.nextInt();
		long d=sc.nextInt();
		long[] xy=new long[4];
		xy[0]=a*c;
		xy[1]=a*d;
		xy[2]=b*c;
		xy[3]=b*d;
		long ans=xy[0];
		for(int i=0;i<4;i++){
			ans=Math.max(xy[i],ans);
		}
		System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long a=sc.nextInt(); a sc.nextInt() sc.nextInt sc long b=sc.nextInt(); b sc.nextInt() sc.nextInt sc long c=sc.nextInt(); c sc.nextInt() sc.nextInt sc long d=sc.nextInt(); d sc.nextInt() sc.nextInt sc long[] xy=new long[4]; xy new long[4] 4 xy[0]=a*c xy[0] xy 0 a*c a c xy[1]=a*d xy[1] xy 1 a*d a d xy[2]=b*c xy[2] xy 2 b*c b c xy[3]=b*d xy[3] xy 3 b*d b d long ans=xy[0]; ans xy[0] xy 0 for(int i=0;i<4;i++){
			ans=Math.max(xy[i],ans);
		} int i=0; int i=0; i 0 i<4 i 4 i++ i++ i {
			ans=Math.max(xy[i],ans);
		} {
			ans=Math.max(xy[i],ans);
		} ans=Math.max(xy[i],ans) ans Math.max(xy[i],ans) Math.max Math xy[i] xy i ans System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		long a=sc.nextInt();
		long b=sc.nextInt();
		long c=sc.nextInt();
		long d=sc.nextInt();
		long[] xy=new long[4];
		xy[0]=a*c;
		xy[1]=a*d;
		xy[2]=b*c;
		xy[3]=b*d;
		long ans=xy[0];
		for(int i=0;i<4;i++){
			ans=Math.max(xy[i],ans);
		}
		System.out.println(ans);
	}
} public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		long a=sc.nextInt();
		long b=sc.nextInt();
		long c=sc.nextInt();
		long d=sc.nextInt();
		long[] xy=new long[4];
		xy[0]=a*c;
		xy[1]=a*d;
		xy[2]=b*c;
		xy[3]=b*d;
		long ans=xy[0];
		for(int i=0;i<4;i++){
			ans=Math.max(xy[i],ans);
		}
		System.out.println(ans);
	}
} Main
import java.util.*;
public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		long a=sc.nextInt();
		long b=sc.nextInt();
		long c=sc.nextInt();
		long d=sc.nextInt();
		long[] xy=new long[4];
		xy[0]=a*c;
		xy[1]=a*d;
		xy[2]=b*c;
		xy[3]=b*d;
		long ans=xy[0];
		for(int i=0;i<4;i++){
			ans=Math.max(xy[i],ans);
		}
		System.out.println(ans);
	}
}