import java.util.Scanner;

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 max = a * c;
		long tmp = a * d;
		if (max < tmp)
			max = tmp;
		tmp = b * c;
		if (max < tmp)
			max = tmp;
		tmp = b * d;
		if (max < tmp)
			max = tmp;
		System.out.println(max);
		sc.close();
	}
} import java.util.Scanner; Scanner 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 max = a * c;
		long tmp = a * d;
		if (max < tmp)
			max = tmp;
		tmp = b * c;
		if (max < tmp)
			max = tmp;
		tmp = b * d;
		if (max < tmp)
			max = tmp;
		System.out.println(max);
		sc.close();
	}
} 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 max = a * c;
		long tmp = a * d;
		if (max < tmp)
			max = tmp;
		tmp = b * c;
		if (max < tmp)
			max = tmp;
		tmp = b * d;
		if (max < tmp)
			max = tmp;
		System.out.println(max);
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();
		long max = a * c;
		long tmp = a * d;
		if (max < tmp)
			max = tmp;
		tmp = b * c;
		if (max < tmp)
			max = tmp;
		tmp = b * d;
		if (max < tmp)
			max = tmp;
		System.out.println(max);
		sc.close();
	} 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 max = a * c; max a * c a c long tmp = a * d; tmp a * d a d if (max < tmp)
			max = tmp; max < tmp max tmp max = tmp max tmp tmp = b * c tmp b * c b c if (max < tmp)
			max = tmp; max < tmp max tmp max = tmp max tmp tmp = b * d tmp b * d b d if (max < tmp)
			max = tmp; max < tmp max tmp max = tmp max tmp System.out.println(max) System.out.println System.out System System.out max sc.close() sc.close sc String args[] args
import java.util.Scanner;

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 max = a * c;
		long tmp = a * d;
		if (max < tmp)
			max = tmp;
		tmp = b * c;
		if (max < tmp)
			max = tmp;
		tmp = b * d;
		if (max < tmp)
			max = tmp;
		System.out.println(max);
		sc.close();
	}
}
