import java.util.Scanner;

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 max1 = b * d;
		long max2 = a * c;
		long max3 = a * d;
		long max4 = b * c;
		
		System.out.println(Math.max(Math.max(max1, max2), Math.max(max3, max4)));
	}
} import java.util.Scanner; Scanner 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 max1 = b * d;
		long max2 = a * c;
		long max3 = a * d;
		long max4 = b * c;
		
		System.out.println(Math.max(Math.max(max1, max2), Math.max(max3, max4)));
	}
} 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 max1 = b * d;
		long max2 = a * c;
		long max3 = a * d;
		long max4 = b * c;
		
		System.out.println(Math.max(Math.max(max1, max2), Math.max(max3, max4)));
	} main {
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();
		
		long max1 = b * d;
		long max2 = a * c;
		long max3 = a * d;
		long max4 = b * c;
		
		System.out.println(Math.max(Math.max(max1, max2), Math.max(max3, max4)));
	} 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 max1 = b * d; max1 b * d b d long max2 = a * c; max2 a * c a c long max3 = a * d; max3 a * d a d long max4 = b * c; max4 b * c b c System.out.println(Math.max(Math.max(max1, max2), Math.max(max3, max4))) System.out.println System.out System System.out Math.max(Math.max(max1, max2), Math.max(max3, max4)) Math.max Math Math.max(max1, max2) Math.max Math max1 max2 Math.max(max3, max4) Math.max Math max3 max4 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 max1 = b * d;
		long max2 = a * c;
		long max3 = a * d;
		long max4 = b * c;
		
		System.out.println(Math.max(Math.max(max1, max2), Math.max(max3, max4)));
	}
} 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 max1 = b * d;
		long max2 = a * c;
		long max3 = a * d;
		long max4 = b * c;
		
		System.out.println(Math.max(Math.max(max1, max2), Math.max(max3, max4)));
	}
} Main
import java.util.Scanner;

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 max1 = b * d;
		long max2 = a * c;
		long max3 = a * d;
		long max4 = b * c;
		
		System.out.println(Math.max(Math.max(max1, max2), Math.max(max3, max4)));
	}
}
