import java.util.*;
class Main{
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		long[] nums = new long[4];
		for(int i = 0; i < 4; i++) {
			nums[i] = scanner.nextInt();
		}
		long result = nums[0] * nums[2];
		if(result < nums[0]*nums[3])result = nums[0]*nums[3];
		if(result < nums[1]*nums[2])result = nums[1]*nums[2];
		if(result < nums[1]*nums[3])result = nums[1]*nums[3];
		System.out.println(result);
		scanner.close();
	}
} import java.util.*; util.* java class Main{
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		long[] nums = new long[4];
		for(int i = 0; i < 4; i++) {
			nums[i] = scanner.nextInt();
		}
		long result = nums[0] * nums[2];
		if(result < nums[0]*nums[3])result = nums[0]*nums[3];
		if(result < nums[1]*nums[2])result = nums[1]*nums[2];
		if(result < nums[1]*nums[3])result = nums[1]*nums[3];
		System.out.println(result);
		scanner.close();
	}
} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		long[] nums = new long[4];
		for(int i = 0; i < 4; i++) {
			nums[i] = scanner.nextInt();
		}
		long result = nums[0] * nums[2];
		if(result < nums[0]*nums[3])result = nums[0]*nums[3];
		if(result < nums[1]*nums[2])result = nums[1]*nums[2];
		if(result < nums[1]*nums[3])result = nums[1]*nums[3];
		System.out.println(result);
		scanner.close();
	} main {
		Scanner scanner = new Scanner(System.in);
		long[] nums = new long[4];
		for(int i = 0; i < 4; i++) {
			nums[i] = scanner.nextInt();
		}
		long result = nums[0] * nums[2];
		if(result < nums[0]*nums[3])result = nums[0]*nums[3];
		if(result < nums[1]*nums[2])result = nums[1]*nums[2];
		if(result < nums[1]*nums[3])result = nums[1]*nums[3];
		System.out.println(result);
		scanner.close();
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) long[] nums = new long[4]; nums new long[4] 4 for(int i = 0; i < 4; i++) {
			nums[i] = scanner.nextInt();
		} int i = 0; int i = 0; i 0 i < 4 i 4 i++ i++ i {
			nums[i] = scanner.nextInt();
		} {
			nums[i] = scanner.nextInt();
		} nums[i] = scanner.nextInt() nums[i] nums i scanner.nextInt() scanner.nextInt scanner long result = nums[0] * nums[2]; result nums[0] * nums[2] nums[0] nums 0 nums[2] nums 2 if(result < nums[0]*nums[3])result = nums[0]*nums[3]; result < nums[0]*nums[3] result nums[0]*nums[3] nums[0] nums 0 nums[3] nums 3 result = nums[0]*nums[3] result nums[0]*nums[3] nums[0] nums 0 nums[3] nums 3 if(result < nums[1]*nums[2])result = nums[1]*nums[2]; result < nums[1]*nums[2] result nums[1]*nums[2] nums[1] nums 1 nums[2] nums 2 result = nums[1]*nums[2] result nums[1]*nums[2] nums[1] nums 1 nums[2] nums 2 if(result < nums[1]*nums[3])result = nums[1]*nums[3]; result < nums[1]*nums[3] result nums[1]*nums[3] nums[1] nums 1 nums[3] nums 3 result = nums[1]*nums[3] result nums[1]*nums[3] nums[1] nums 1 nums[3] nums 3 System.out.println(result) System.out.println System.out System System.out result scanner.close() scanner.close scanner String[] args args
import java.util.*;
class Main{
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		long[] nums = new long[4];
		for(int i = 0; i < 4; i++) {
			nums[i] = scanner.nextInt();
		}
		long result = nums[0] * nums[2];
		if(result < nums[0]*nums[3])result = nums[0]*nums[3];
		if(result < nums[1]*nums[2])result = nums[1]*nums[2];
		if(result < nums[1]*nums[3])result = nums[1]*nums[3];
		System.out.println(result);
		scanner.close();
	}
}