import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long a = sc.nextInt();
		long b = sc.nextInt();
		long c = sc.nextInt();
		long d = sc.nextInt();
		long answer = 0;
		if (a * c > answer) {
			answer = a * c;
		}
		if (b * d > answer) {
			answer = b * d;
		}
		if (answer == 0) {
			if (a * d > b * c) {
				answer = a * d;
			} else {
				answer = b * c;
			}
		}
		System.out.println(answer);
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long a = sc.nextInt();
		long b = sc.nextInt();
		long c = sc.nextInt();
		long d = sc.nextInt();
		long answer = 0;
		if (a * c > answer) {
			answer = a * c;
		}
		if (b * d > answer) {
			answer = b * d;
		}
		if (answer == 0) {
			if (a * d > b * c) {
				answer = a * d;
			} else {
				answer = b * c;
			}
		}
		System.out.println(answer);
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long a = sc.nextInt();
		long b = sc.nextInt();
		long c = sc.nextInt();
		long d = sc.nextInt();
		long answer = 0;
		if (a * c > answer) {
			answer = a * c;
		}
		if (b * d > answer) {
			answer = b * d;
		}
		if (answer == 0) {
			if (a * d > b * c) {
				answer = a * d;
			} else {
				answer = b * c;
			}
		}
		System.out.println(answer);
	} main {
		Scanner sc = new Scanner(System.in);
		long a = sc.nextInt();
		long b = sc.nextInt();
		long c = sc.nextInt();
		long d = sc.nextInt();
		long answer = 0;
		if (a * c > answer) {
			answer = a * c;
		}
		if (b * d > answer) {
			answer = b * d;
		}
		if (answer == 0) {
			if (a * d > b * c) {
				answer = a * d;
			} else {
				answer = b * c;
			}
		}
		System.out.println(answer);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long a = sc.nextInt(); a sc.nextInt() sc.nextInt sc long b = sc.nextInt(); b sc.nextInt() sc.nextInt sc long c = sc.nextInt(); c sc.nextInt() sc.nextInt sc long d = sc.nextInt(); d sc.nextInt() sc.nextInt sc long answer = 0; answer 0 if (a * c > answer) {
			answer = a * c;
		} a * c > answer a * c a c answer {
			answer = a * c;
		} answer = a * c answer a * c a c if (b * d > answer) {
			answer = b * d;
		} b * d > answer b * d b d answer {
			answer = b * d;
		} answer = b * d answer b * d b d if (answer == 0) {
			if (a * d > b * c) {
				answer = a * d;
			} else {
				answer = b * c;
			}
		} answer == 0 answer 0 {
			if (a * d > b * c) {
				answer = a * d;
			} else {
				answer = b * c;
			}
		} if (a * d > b * c) {
				answer = a * d;
			} else {
				answer = b * c;
			} a * d > b * c a * d a d b * c b c {
				answer = a * d;
			} answer = a * d answer a * d a d {
				answer = b * c;
			} answer = b * c answer b * c b c System.out.println(answer) System.out.println System.out System System.out answer String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long a = sc.nextInt();
		long b = sc.nextInt();
		long c = sc.nextInt();
		long d = sc.nextInt();
		long answer = 0;
		if (a * c > answer) {
			answer = a * c;
		}
		if (b * d > answer) {
			answer = b * d;
		}
		if (answer == 0) {
			if (a * d > b * c) {
				answer = a * d;
			} else {
				answer = b * c;
			}
		}
		System.out.println(answer);
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long a = sc.nextInt();
		long b = sc.nextInt();
		long c = sc.nextInt();
		long d = sc.nextInt();
		long answer = 0;
		if (a * c > answer) {
			answer = a * c;
		}
		if (b * d > answer) {
			answer = b * d;
		}
		if (answer == 0) {
			if (a * d > b * c) {
				answer = a * d;
			} else {
				answer = b * c;
			}
		}
		System.out.println(answer);
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long a = sc.nextInt();
		long b = sc.nextInt();
		long c = sc.nextInt();
		long d = sc.nextInt();
		long answer = 0;
		if (a * c > answer) {
			answer = a * c;
		}
		if (b * d > answer) {
			answer = b * d;
		}
		if (answer == 0) {
			if (a * d > b * c) {
				answer = a * d;
			} else {
				answer = b * c;
			}
		}
		System.out.println(answer);
	}

}
