import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String[] t = sc.nextLine().split(" ");
		long a = Long.parseLong(t[0]);
		long b = Long.parseLong(t[1]);
		long c = Long.parseLong(t[2]);
		long d = Long.parseLong(t[3]);

		long ans = a * c;
		ans = Math.max(ans, a * d);
		ans = Math.max(ans, b * d);
		ans = Math.max(ans, b * c);

		if((a <= 0 && b >= 0 )|| (c <= 0 && d >= 0)) {
			ans = Math.max(ans, 0);
		}


		System.out.println(ans);
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String[] t = sc.nextLine().split(" ");
		long a = Long.parseLong(t[0]);
		long b = Long.parseLong(t[1]);
		long c = Long.parseLong(t[2]);
		long d = Long.parseLong(t[3]);

		long ans = a * c;
		ans = Math.max(ans, a * d);
		ans = Math.max(ans, b * d);
		ans = Math.max(ans, b * c);

		if((a <= 0 && b >= 0 )|| (c <= 0 && d >= 0)) {
			ans = Math.max(ans, 0);
		}


		System.out.println(ans);
	}
} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String[] t = sc.nextLine().split(" ");
		long a = Long.parseLong(t[0]);
		long b = Long.parseLong(t[1]);
		long c = Long.parseLong(t[2]);
		long d = Long.parseLong(t[3]);

		long ans = a * c;
		ans = Math.max(ans, a * d);
		ans = Math.max(ans, b * d);
		ans = Math.max(ans, b * c);

		if((a <= 0 && b >= 0 )|| (c <= 0 && d >= 0)) {
			ans = Math.max(ans, 0);
		}


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

		Scanner sc = new Scanner(System.in);

		String[] t = sc.nextLine().split(" ");
		long a = Long.parseLong(t[0]);
		long b = Long.parseLong(t[1]);
		long c = Long.parseLong(t[2]);
		long d = Long.parseLong(t[3]);

		long ans = a * c;
		ans = Math.max(ans, a * d);
		ans = Math.max(ans, b * d);
		ans = Math.max(ans, b * c);

		if((a <= 0 && b >= 0 )|| (c <= 0 && d >= 0)) {
			ans = Math.max(ans, 0);
		}


		System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String[] t = sc.nextLine().split(" "); t sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " long a = Long.parseLong(t[0]); a Long.parseLong(t[0]) Long.parseLong Long t[0] t 0 long b = Long.parseLong(t[1]); b Long.parseLong(t[1]) Long.parseLong Long t[1] t 1 long c = Long.parseLong(t[2]); c Long.parseLong(t[2]) Long.parseLong Long t[2] t 2 long d = Long.parseLong(t[3]); d Long.parseLong(t[3]) Long.parseLong Long t[3] t 3 long ans = a * c; ans a * c a c ans = Math.max(ans, a * d) ans Math.max(ans, a * d) Math.max Math ans a * d a d ans = Math.max(ans, b * d) ans Math.max(ans, b * d) Math.max Math ans b * d b d ans = Math.max(ans, b * c) ans Math.max(ans, b * c) Math.max Math ans b * c b c if((a <= 0 && b >= 0 )|| (c <= 0 && d >= 0)) {
			ans = Math.max(ans, 0);
		} (a <= 0 && b >= 0 )|| (c <= 0 && d >= 0) (a <= 0 && b >= 0 ) a <= 0 a 0 b >= 0 b 0 (c <= 0 && d >= 0) c <= 0 c 0 d >= 0 d 0 {
			ans = Math.max(ans, 0);
		} ans = Math.max(ans, 0) ans Math.max(ans, 0) Math.max Math ans 0 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) {

		Scanner sc = new Scanner(System.in);

		String[] t = sc.nextLine().split(" ");
		long a = Long.parseLong(t[0]);
		long b = Long.parseLong(t[1]);
		long c = Long.parseLong(t[2]);
		long d = Long.parseLong(t[3]);

		long ans = a * c;
		ans = Math.max(ans, a * d);
		ans = Math.max(ans, b * d);
		ans = Math.max(ans, b * c);

		if((a <= 0 && b >= 0 )|| (c <= 0 && d >= 0)) {
			ans = Math.max(ans, 0);
		}


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

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String[] t = sc.nextLine().split(" ");
		long a = Long.parseLong(t[0]);
		long b = Long.parseLong(t[1]);
		long c = Long.parseLong(t[2]);
		long d = Long.parseLong(t[3]);

		long ans = a * c;
		ans = Math.max(ans, a * d);
		ans = Math.max(ans, b * d);
		ans = Math.max(ans, b * c);

		if((a <= 0 && b >= 0 )|| (c <= 0 && d >= 0)) {
			ans = Math.max(ans, 0);
		}


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

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String[] t = sc.nextLine().split(" ");
		long a = Long.parseLong(t[0]);
		long b = Long.parseLong(t[1]);
		long c = Long.parseLong(t[2]);
		long d = Long.parseLong(t[3]);

		long ans = a * c;
		ans = Math.max(ans, a * d);
		ans = Math.max(ans, b * d);
		ans = Math.max(ans, b * c);

		if((a <= 0 && b >= 0 )|| (c <= 0 && d >= 0)) {
			ans = Math.max(ans, 0);
		}


		System.out.println(ans);
	}
}