import java.util.Arrays;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			long a = scanner.nextLong(), b = scanner.nextLong(), c = scanner.nextLong(), d = scanner.nextLong();
			System.out.println(max(a * c, a * d, b * c, b * d));
		}
	}

	/**
	 * 配列の最大値を計算する
	 * 
	 * @param a 配列
	 * @return 配列の最大値
	 */
	private static long max(long... a) {
		return Arrays.stream(a).max().getAsLong();
	}
} import java.util.Arrays; Arrays 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)) {
			long a = scanner.nextLong(), b = scanner.nextLong(), c = scanner.nextLong(), d = scanner.nextLong();
			System.out.println(max(a * c, a * d, b * c, b * d));
		}
	}

	/**
	 * 配列の最大値を計算する
	 * 
	 * @param a 配列
	 * @return 配列の最大値
	 */
	private static long max(long... a) {
		return Arrays.stream(a).max().getAsLong();
	}
} Main public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			long a = scanner.nextLong(), b = scanner.nextLong(), c = scanner.nextLong(), d = scanner.nextLong();
			System.out.println(max(a * c, a * d, b * c, b * d));
		}
	} main {
		try (Scanner scanner = new Scanner(System.in)) {
			long a = scanner.nextLong(), b = scanner.nextLong(), c = scanner.nextLong(), d = scanner.nextLong();
			System.out.println(max(a * c, a * d, b * c, b * d));
		}
	} try (Scanner scanner = new Scanner(System.in)) {
			long a = scanner.nextLong(), b = scanner.nextLong(), c = scanner.nextLong(), d = scanner.nextLong();
			System.out.println(max(a * c, a * d, b * c, b * d));
		} {
			long a = scanner.nextLong(), b = scanner.nextLong(), c = scanner.nextLong(), d = scanner.nextLong();
			System.out.println(max(a * c, a * d, b * c, b * d));
		} Scanner scanner = new Scanner(System.in) Scanner scanner = new Scanner(System.in) new Scanner(System.in) long a = scanner.nextLong() a scanner.nextLong() scanner.nextLong scanner b = scanner.nextLong() b scanner.nextLong() scanner.nextLong scanner c = scanner.nextLong() c scanner.nextLong() scanner.nextLong scanner d = scanner.nextLong(); d scanner.nextLong() scanner.nextLong scanner System.out.println(max(a * c, a * d, b * c, b * d)) System.out.println System.out System System.out max(a * c, a * d, b * c, b * d) max a * c a c a * d a d b * c b c b * d b d String[] args args /**
	 * 配列の最大値を計算する
	 * 
	 * @param a 配列
	 * @return 配列の最大値
	 */
	private static long max(long... a) {
		return Arrays.stream(a).max().getAsLong();
	} max {
		return Arrays.stream(a).max().getAsLong();
	} return Arrays.stream(a).max().getAsLong(); Arrays.stream(a).max().getAsLong() Arrays.stream(a).max().getAsLong Arrays.stream(a).max() Arrays.stream(a).max Arrays.stream(a) Arrays.stream Arrays a long... a a public class Main {

	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			long a = scanner.nextLong(), b = scanner.nextLong(), c = scanner.nextLong(), d = scanner.nextLong();
			System.out.println(max(a * c, a * d, b * c, b * d));
		}
	}

	/**
	 * 配列の最大値を計算する
	 * 
	 * @param a 配列
	 * @return 配列の最大値
	 */
	private static long max(long... a) {
		return Arrays.stream(a).max().getAsLong();
	}
} public class Main {

	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			long a = scanner.nextLong(), b = scanner.nextLong(), c = scanner.nextLong(), d = scanner.nextLong();
			System.out.println(max(a * c, a * d, b * c, b * d));
		}
	}

	/**
	 * 配列の最大値を計算する
	 * 
	 * @param a 配列
	 * @return 配列の最大値
	 */
	private static long max(long... a) {
		return Arrays.stream(a).max().getAsLong();
	}
} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			long a = scanner.nextLong(), b = scanner.nextLong(), c = scanner.nextLong(), d = scanner.nextLong();
			System.out.println(max(a * c, a * d, b * c, b * d));
		}
	}

	/**
	 * 配列の最大値を計算する
	 * 
	 * @param a 配列
	 * @return 配列の最大値
	 */
	private static long max(long... a) {
		return Arrays.stream(a).max().getAsLong();
	}
}
