import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);

		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();

		long ans = 0;
		if(a < 0 && b <= 0) {
			if(c < 0) {
				ans = a * c;
				System.out.print(ans);
			}else{
				ans = b * c;
				System.out.print(ans);
			}
		}else if(c < 0 && d <= 0) {
			if(a < 0) {
				ans = a * c;
				System.out.print(ans);
			}else{
				ans = a * d;
				System.out.print(ans);
			}
		}else {
			if(a * c > b * d) {
				System.out.print(a * c);
			}else {
				System.out.print(b * d);
			}
		}

		sc.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);

		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();

		long ans = 0;
		if(a < 0 && b <= 0) {
			if(c < 0) {
				ans = a * c;
				System.out.print(ans);
			}else{
				ans = b * c;
				System.out.print(ans);
			}
		}else if(c < 0 && d <= 0) {
			if(a < 0) {
				ans = a * c;
				System.out.print(ans);
			}else{
				ans = a * d;
				System.out.print(ans);
			}
		}else {
			if(a * c > b * d) {
				System.out.print(a * c);
			}else {
				System.out.print(b * d);
			}
		}

		sc.close();
	}
} Main public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);

		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();

		long ans = 0;
		if(a < 0 && b <= 0) {
			if(c < 0) {
				ans = a * c;
				System.out.print(ans);
			}else{
				ans = b * c;
				System.out.print(ans);
			}
		}else if(c < 0 && d <= 0) {
			if(a < 0) {
				ans = a * c;
				System.out.print(ans);
			}else{
				ans = a * d;
				System.out.print(ans);
			}
		}else {
			if(a * c > b * d) {
				System.out.print(a * c);
			}else {
				System.out.print(b * d);
			}
		}

		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);

		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();

		long ans = 0;
		if(a < 0 && b <= 0) {
			if(c < 0) {
				ans = a * c;
				System.out.print(ans);
			}else{
				ans = b * c;
				System.out.print(ans);
			}
		}else if(c < 0 && d <= 0) {
			if(a < 0) {
				ans = a * c;
				System.out.print(ans);
			}else{
				ans = a * d;
				System.out.print(ans);
			}
		}else {
			if(a * c > b * d) {
				System.out.print(a * c);
			}else {
				System.out.print(b * d);
			}
		}

		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long a = sc.nextLong(); a sc.nextLong() sc.nextLong sc long b = sc.nextLong(); b sc.nextLong() sc.nextLong sc long c = sc.nextLong(); c sc.nextLong() sc.nextLong sc long d = sc.nextLong(); d sc.nextLong() sc.nextLong sc long ans = 0; ans 0 if(a < 0 && b <= 0) {
			if(c < 0) {
				ans = a * c;
				System.out.print(ans);
			}else{
				ans = b * c;
				System.out.print(ans);
			}
		}else if(c < 0 && d <= 0) {
			if(a < 0) {
				ans = a * c;
				System.out.print(ans);
			}else{
				ans = a * d;
				System.out.print(ans);
			}
		}else {
			if(a * c > b * d) {
				System.out.print(a * c);
			}else {
				System.out.print(b * d);
			}
		} a < 0 && b <= 0 a < 0 a 0 b <= 0 b 0 {
			if(c < 0) {
				ans = a * c;
				System.out.print(ans);
			}else{
				ans = b * c;
				System.out.print(ans);
			}
		} if(c < 0) {
				ans = a * c;
				System.out.print(ans);
			}else{
				ans = b * c;
				System.out.print(ans);
			} c < 0 c 0 {
				ans = a * c;
				System.out.print(ans);
			} ans = a * c ans a * c a c System.out.print(ans) System.out.print System.out System System.out ans {
				ans = b * c;
				System.out.print(ans);
			} ans = b * c ans b * c b c System.out.print(ans) System.out.print System.out System System.out ans if(c < 0 && d <= 0) {
			if(a < 0) {
				ans = a * c;
				System.out.print(ans);
			}else{
				ans = a * d;
				System.out.print(ans);
			}
		}else {
			if(a * c > b * d) {
				System.out.print(a * c);
			}else {
				System.out.print(b * d);
			}
		} c < 0 && d <= 0 c < 0 c 0 d <= 0 d 0 {
			if(a < 0) {
				ans = a * c;
				System.out.print(ans);
			}else{
				ans = a * d;
				System.out.print(ans);
			}
		} if(a < 0) {
				ans = a * c;
				System.out.print(ans);
			}else{
				ans = a * d;
				System.out.print(ans);
			} a < 0 a 0 {
				ans = a * c;
				System.out.print(ans);
			} ans = a * c ans a * c a c System.out.print(ans) System.out.print System.out System System.out ans {
				ans = a * d;
				System.out.print(ans);
			} ans = a * d ans a * d a d System.out.print(ans) System.out.print System.out System System.out ans {
			if(a * c > b * d) {
				System.out.print(a * c);
			}else {
				System.out.print(b * d);
			}
		} if(a * c > b * d) {
				System.out.print(a * c);
			}else {
				System.out.print(b * d);
			} a * c > b * d a * c a c b * d b d {
				System.out.print(a * c);
			} System.out.print(a * c) System.out.print System.out System System.out a * c a c {
				System.out.print(b * d);
			} System.out.print(b * d) System.out.print System.out System System.out b * d b d sc.close() sc.close sc String[] args args public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);

		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();

		long ans = 0;
		if(a < 0 && b <= 0) {
			if(c < 0) {
				ans = a * c;
				System.out.print(ans);
			}else{
				ans = b * c;
				System.out.print(ans);
			}
		}else if(c < 0 && d <= 0) {
			if(a < 0) {
				ans = a * c;
				System.out.print(ans);
			}else{
				ans = a * d;
				System.out.print(ans);
			}
		}else {
			if(a * c > b * d) {
				System.out.print(a * c);
			}else {
				System.out.print(b * d);
			}
		}

		sc.close();
	}
} public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);

		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();

		long ans = 0;
		if(a < 0 && b <= 0) {
			if(c < 0) {
				ans = a * c;
				System.out.print(ans);
			}else{
				ans = b * c;
				System.out.print(ans);
			}
		}else if(c < 0 && d <= 0) {
			if(a < 0) {
				ans = a * c;
				System.out.print(ans);
			}else{
				ans = a * d;
				System.out.print(ans);
			}
		}else {
			if(a * c > b * d) {
				System.out.print(a * c);
			}else {
				System.out.print(b * d);
			}
		}

		sc.close();
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);

		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();

		long ans = 0;
		if(a < 0 && b <= 0) {
			if(c < 0) {
				ans = a * c;
				System.out.print(ans);
			}else{
				ans = b * c;
				System.out.print(ans);
			}
		}else if(c < 0 && d <= 0) {
			if(a < 0) {
				ans = a * c;
				System.out.print(ans);
			}else{
				ans = a * d;
				System.out.print(ans);
			}
		}else {
			if(a * c > b * d) {
				System.out.print(a * c);
			}else {
				System.out.print(b * d);
			}
		}

		sc.close();
	}
}