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();
			if (((b <= 0) && (c >= 0)) || ((a >= 0) && (c <= 0))) {
				// 正の数と負の数の組合せの場合
				System.out.println(max(a * c, a * d, b * c, b * d));
			} else {
				System.out.println(max(a * c, a * d, b * c, b * d, 0));
			}
		}
	}

	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();
			if (((b <= 0) && (c >= 0)) || ((a >= 0) && (c <= 0))) {
				// 正の数と負の数の組合せの場合
				System.out.println(max(a * c, a * d, b * c, b * d));
			} else {
				System.out.println(max(a * c, a * d, b * c, b * d, 0));
			}
		}
	}

	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();
			if (((b <= 0) && (c >= 0)) || ((a >= 0) && (c <= 0))) {
				// 正の数と負の数の組合せの場合
				System.out.println(max(a * c, a * d, b * c, b * d));
			} else {
				System.out.println(max(a * c, a * d, b * c, b * d, 0));
			}
		}
	} main {
		try (Scanner scanner = new Scanner(System.in)) {
			long a = scanner.nextLong(), b = scanner.nextLong(), c = scanner.nextLong(), d = scanner.nextLong();
			if (((b <= 0) && (c >= 0)) || ((a >= 0) && (c <= 0))) {
				// 正の数と負の数の組合せの場合
				System.out.println(max(a * c, a * d, b * c, b * d));
			} else {
				System.out.println(max(a * c, a * d, b * c, b * d, 0));
			}
		}
	} try (Scanner scanner = new Scanner(System.in)) {
			long a = scanner.nextLong(), b = scanner.nextLong(), c = scanner.nextLong(), d = scanner.nextLong();
			if (((b <= 0) && (c >= 0)) || ((a >= 0) && (c <= 0))) {
				// 正の数と負の数の組合せの場合
				System.out.println(max(a * c, a * d, b * c, b * d));
			} else {
				System.out.println(max(a * c, a * d, b * c, b * d, 0));
			}
		} {
			long a = scanner.nextLong(), b = scanner.nextLong(), c = scanner.nextLong(), d = scanner.nextLong();
			if (((b <= 0) && (c >= 0)) || ((a >= 0) && (c <= 0))) {
				// 正の数と負の数の組合せの場合
				System.out.println(max(a * c, a * d, b * c, b * d));
			} else {
				System.out.println(max(a * c, a * d, b * c, b * d, 0));
			}
		} 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 if (((b <= 0) && (c >= 0)) || ((a >= 0) && (c <= 0))) {
				// 正の数と負の数の組合せの場合
				System.out.println(max(a * c, a * d, b * c, b * d));
			} else {
				System.out.println(max(a * c, a * d, b * c, b * d, 0));
			} ((b <= 0) && (c >= 0)) || ((a >= 0) && (c <= 0)) ((b <= 0) && (c >= 0)) (b <= 0) b 0 (c >= 0) c 0 ((a >= 0) && (c <= 0)) (a >= 0) a 0 (c <= 0) c 0 {
				// 正の数と負の数の組合せの場合
				System.out.println(max(a * c, a * d, b * c, b * d));
			} 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 {
				System.out.println(max(a * c, a * d, b * c, b * d, 0));
			} System.out.println(max(a * c, a * d, b * c, b * d, 0)) System.out.println System.out System System.out max(a * c, a * d, b * c, b * d, 0) max a * c a c a * d a d b * c b c b * d b d 0 String[] args args 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();
			if (((b <= 0) && (c >= 0)) || ((a >= 0) && (c <= 0))) {
				// 正の数と負の数の組合せの場合
				System.out.println(max(a * c, a * d, b * c, b * d));
			} else {
				System.out.println(max(a * c, a * d, b * c, b * d, 0));
			}
		}
	}

	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();
			if (((b <= 0) && (c >= 0)) || ((a >= 0) && (c <= 0))) {
				// 正の数と負の数の組合せの場合
				System.out.println(max(a * c, a * d, b * c, b * d));
			} else {
				System.out.println(max(a * c, a * d, b * c, b * d, 0));
			}
		}
	}

	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();
			if (((b <= 0) && (c >= 0)) || ((a >= 0) && (c <= 0))) {
				// 正の数と負の数の組合せの場合
				System.out.println(max(a * c, a * d, b * c, b * d));
			} else {
				System.out.println(max(a * c, a * d, b * c, b * d, 0));
			}
		}
	}

	private static long max(long... a) {
		return Arrays.stream(a).max().getAsLong();
	}
}
