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 ac=a*c;
		long ad=a*d;
		long bc=b*c;
		long bd=b*d;
		System.out.println(Math.max(Math.max(ac, bd),Math.max(ad, bc)));
	}

} 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 ac=a*c;
		long ad=a*d;
		long bc=b*c;
		long bd=b*d;
		System.out.println(Math.max(Math.max(ac, bd),Math.max(ad, bc)));
	}

} 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 ac=a*c;
		long ad=a*d;
		long bc=b*c;
		long bd=b*d;
		System.out.println(Math.max(Math.max(ac, bd),Math.max(ad, bc)));
	} main {
		Scanner sc=new Scanner(System.in);
		long a=sc.nextLong();
		long b=sc.nextLong();
		long c=sc.nextLong();
		long d=sc.nextLong();
		long ac=a*c;
		long ad=a*d;
		long bc=b*c;
		long bd=b*d;
		System.out.println(Math.max(Math.max(ac, bd),Math.max(ad, bc)));
	} 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 ac=a*c; ac a*c a c long ad=a*d; ad a*d a d long bc=b*c; bc b*c b c long bd=b*d; bd b*d b d System.out.println(Math.max(Math.max(ac, bd),Math.max(ad, bc))) System.out.println System.out System System.out Math.max(Math.max(ac, bd),Math.max(ad, bc)) Math.max Math Math.max(ac, bd) Math.max Math ac bd Math.max(ad, bc) Math.max Math ad bc 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 ac=a*c;
		long ad=a*d;
		long bc=b*c;
		long bd=b*d;
		System.out.println(Math.max(Math.max(ac, bd),Math.max(ad, bc)));
	}

} 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 ac=a*c;
		long ad=a*d;
		long bc=b*c;
		long bd=b*d;
		System.out.println(Math.max(Math.max(ac, bd),Math.max(ad, bc)));
	}

} 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 ac=a*c;
		long ad=a*d;
		long bc=b*c;
		long bd=b*d;
		System.out.println(Math.max(Math.max(ac, bd),Math.max(ad, bc)));
	}

}
