import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		try(Scanner scanner = new Scanner(System.in)) {
			String data = scanner.nextLine();
			String[] arr = data.split(" ");
			long a = Long.parseLong(arr[0]);
			long b = Long.parseLong(arr[1]);
			long c = Long.parseLong(arr[2]);
			long d = Long.parseLong(arr[3]);

			List<Long> xList = new ArrayList<Long>() {
				{
					add(a);
					add(b);
				}
			};

			List<Long> yList = new ArrayList<Long>() {
				{
					add(c);
					add(d);
				}
			};

			long ans = -1 * Long.MAX_VALUE;
			for (Long x : xList) {
				for (Long y : yList) {

					ans = Math.max(ans, x * y);

				}
			}

			System.out.println(ans);
		}
	}
} ArrayList<Long>() {
				{
					add(c);
					add(d);
				}
			} ArrayList<Long>() {
				{
					add(a);
					add(b);
				}
			} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		try(Scanner scanner = new Scanner(System.in)) {
			String data = scanner.nextLine();
			String[] arr = data.split(" ");
			long a = Long.parseLong(arr[0]);
			long b = Long.parseLong(arr[1]);
			long c = Long.parseLong(arr[2]);
			long d = Long.parseLong(arr[3]);

			List<Long> xList = new ArrayList<Long>() {
				{
					add(a);
					add(b);
				}
			};

			List<Long> yList = new ArrayList<Long>() {
				{
					add(c);
					add(d);
				}
			};

			long ans = -1 * Long.MAX_VALUE;
			for (Long x : xList) {
				for (Long y : yList) {

					ans = Math.max(ans, x * y);

				}
			}

			System.out.println(ans);
		}
	}
} Main public static void main(String[] args) {
		try(Scanner scanner = new Scanner(System.in)) {
			String data = scanner.nextLine();
			String[] arr = data.split(" ");
			long a = Long.parseLong(arr[0]);
			long b = Long.parseLong(arr[1]);
			long c = Long.parseLong(arr[2]);
			long d = Long.parseLong(arr[3]);

			List<Long> xList = new ArrayList<Long>() {
				{
					add(a);
					add(b);
				}
			};

			List<Long> yList = new ArrayList<Long>() {
				{
					add(c);
					add(d);
				}
			};

			long ans = -1 * Long.MAX_VALUE;
			for (Long x : xList) {
				for (Long y : yList) {

					ans = Math.max(ans, x * y);

				}
			}

			System.out.println(ans);
		}
	} main {
		try(Scanner scanner = new Scanner(System.in)) {
			String data = scanner.nextLine();
			String[] arr = data.split(" ");
			long a = Long.parseLong(arr[0]);
			long b = Long.parseLong(arr[1]);
			long c = Long.parseLong(arr[2]);
			long d = Long.parseLong(arr[3]);

			List<Long> xList = new ArrayList<Long>() {
				{
					add(a);
					add(b);
				}
			};

			List<Long> yList = new ArrayList<Long>() {
				{
					add(c);
					add(d);
				}
			};

			long ans = -1 * Long.MAX_VALUE;
			for (Long x : xList) {
				for (Long y : yList) {

					ans = Math.max(ans, x * y);

				}
			}

			System.out.println(ans);
		}
	} try(Scanner scanner = new Scanner(System.in)) {
			String data = scanner.nextLine();
			String[] arr = data.split(" ");
			long a = Long.parseLong(arr[0]);
			long b = Long.parseLong(arr[1]);
			long c = Long.parseLong(arr[2]);
			long d = Long.parseLong(arr[3]);

			List<Long> xList = new ArrayList<Long>() {
				{
					add(a);
					add(b);
				}
			};

			List<Long> yList = new ArrayList<Long>() {
				{
					add(c);
					add(d);
				}
			};

			long ans = -1 * Long.MAX_VALUE;
			for (Long x : xList) {
				for (Long y : yList) {

					ans = Math.max(ans, x * y);

				}
			}

			System.out.println(ans);
		} {
			String data = scanner.nextLine();
			String[] arr = data.split(" ");
			long a = Long.parseLong(arr[0]);
			long b = Long.parseLong(arr[1]);
			long c = Long.parseLong(arr[2]);
			long d = Long.parseLong(arr[3]);

			List<Long> xList = new ArrayList<Long>() {
				{
					add(a);
					add(b);
				}
			};

			List<Long> yList = new ArrayList<Long>() {
				{
					add(c);
					add(d);
				}
			};

			long ans = -1 * Long.MAX_VALUE;
			for (Long x : xList) {
				for (Long y : yList) {

					ans = Math.max(ans, x * y);

				}
			}

			System.out.println(ans);
		} Scanner scanner = new Scanner(System.in) Scanner scanner = new Scanner(System.in) new Scanner(System.in) String data = scanner.nextLine(); data scanner.nextLine() scanner.nextLine scanner String[] arr = data.split(" "); arr data.split(" ") data.split data " " long a = Long.parseLong(arr[0]); a Long.parseLong(arr[0]) Long.parseLong Long arr[0] arr 0 long b = Long.parseLong(arr[1]); b Long.parseLong(arr[1]) Long.parseLong Long arr[1] arr 1 long c = Long.parseLong(arr[2]); c Long.parseLong(arr[2]) Long.parseLong Long arr[2] arr 2 long d = Long.parseLong(arr[3]); d Long.parseLong(arr[3]) Long.parseLong Long arr[3] arr 3 List<Long> xList = new ArrayList<Long>() {
				{
					add(a);
					add(b);
				}
			}; xList new ArrayList<Long>() {
				{
					add(a);
					add(b);
				}
			} List<Long> yList = new ArrayList<Long>() {
				{
					add(c);
					add(d);
				}
			}; yList new ArrayList<Long>() {
				{
					add(c);
					add(d);
				}
			} long ans = -1 * Long.MAX_VALUE; ans -1 * Long.MAX_VALUE -1 1 Long.MAX_VALUE Long Long.MAX_VALUE for (Long x : xList) {
				for (Long y : yList) {

					ans = Math.max(ans, x * y);

				}
			} Long x xList {
				for (Long y : yList) {

					ans = Math.max(ans, x * y);

				}
			} {
				for (Long y : yList) {

					ans = Math.max(ans, x * y);

				}
			} for (Long y : yList) {

					ans = Math.max(ans, x * y);

				} Long y yList {

					ans = Math.max(ans, x * y);

				} {

					ans = Math.max(ans, x * y);

				} ans = Math.max(ans, x * y) ans Math.max(ans, x * y) Math.max Math ans x * y x y 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) {
		try(Scanner scanner = new Scanner(System.in)) {
			String data = scanner.nextLine();
			String[] arr = data.split(" ");
			long a = Long.parseLong(arr[0]);
			long b = Long.parseLong(arr[1]);
			long c = Long.parseLong(arr[2]);
			long d = Long.parseLong(arr[3]);

			List<Long> xList = new ArrayList<Long>() {
				{
					add(a);
					add(b);
				}
			};

			List<Long> yList = new ArrayList<Long>() {
				{
					add(c);
					add(d);
				}
			};

			long ans = -1 * Long.MAX_VALUE;
			for (Long x : xList) {
				for (Long y : yList) {

					ans = Math.max(ans, x * y);

				}
			}

			System.out.println(ans);
		}
	}
} public class Main {

	public static void main(String[] args) {
		try(Scanner scanner = new Scanner(System.in)) {
			String data = scanner.nextLine();
			String[] arr = data.split(" ");
			long a = Long.parseLong(arr[0]);
			long b = Long.parseLong(arr[1]);
			long c = Long.parseLong(arr[2]);
			long d = Long.parseLong(arr[3]);

			List<Long> xList = new ArrayList<Long>() {
				{
					add(a);
					add(b);
				}
			};

			List<Long> yList = new ArrayList<Long>() {
				{
					add(c);
					add(d);
				}
			};

			long ans = -1 * Long.MAX_VALUE;
			for (Long x : xList) {
				for (Long y : yList) {

					ans = Math.max(ans, x * y);

				}
			}

			System.out.println(ans);
		}
	}
} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		try(Scanner scanner = new Scanner(System.in)) {
			String data = scanner.nextLine();
			String[] arr = data.split(" ");
			long a = Long.parseLong(arr[0]);
			long b = Long.parseLong(arr[1]);
			long c = Long.parseLong(arr[2]);
			long d = Long.parseLong(arr[3]);

			List<Long> xList = new ArrayList<Long>() {
				{
					add(a);
					add(b);
				}
			};

			List<Long> yList = new ArrayList<Long>() {
				{
					add(c);
					add(d);
				}
			};

			long ans = -1 * Long.MAX_VALUE;
			for (Long x : xList) {
				for (Long y : yList) {

					ans = Math.max(ans, x * y);

				}
			}

			System.out.println(ans);
		}
	}
}