import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Comparator;

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str[] = br.readLine().split(" ");

		long a = Long.parseLong(str[0]);
		long b = Long.parseLong(str[1]);
		long c = Long.parseLong(str[2]);
		long d = Long.parseLong(str[3]);

		if (b < 0 && d < 0) {
			System.out.println(a * c);
		} else if (a > 0 && c > 0) {
			System.out.println(b * d);
		} else {
			long A = a * c;
			long B = b * d;
			long C = a * d;
			long D = b * c;

			long max = Long.MIN_VALUE;
			max = Math.max(max, A);
			max = Math.max(max, B);
			max = Math.max(max, C);
			max = Math.max(max, D);
			System.out.println(max);
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Arrays; Arrays java.util import java.util.Comparator; Comparator java.util public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str[] = br.readLine().split(" ");

		long a = Long.parseLong(str[0]);
		long b = Long.parseLong(str[1]);
		long c = Long.parseLong(str[2]);
		long d = Long.parseLong(str[3]);

		if (b < 0 && d < 0) {
			System.out.println(a * c);
		} else if (a > 0 && c > 0) {
			System.out.println(b * d);
		} else {
			long A = a * c;
			long B = b * d;
			long C = a * d;
			long D = b * c;

			long max = Long.MIN_VALUE;
			max = Math.max(max, A);
			max = Math.max(max, B);
			max = Math.max(max, C);
			max = Math.max(max, D);
			System.out.println(max);
		}
	}
} Main public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str[] = br.readLine().split(" ");

		long a = Long.parseLong(str[0]);
		long b = Long.parseLong(str[1]);
		long c = Long.parseLong(str[2]);
		long d = Long.parseLong(str[3]);

		if (b < 0 && d < 0) {
			System.out.println(a * c);
		} else if (a > 0 && c > 0) {
			System.out.println(b * d);
		} else {
			long A = a * c;
			long B = b * d;
			long C = a * d;
			long D = b * c;

			long max = Long.MIN_VALUE;
			max = Math.max(max, A);
			max = Math.max(max, B);
			max = Math.max(max, C);
			max = Math.max(max, D);
			System.out.println(max);
		}
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str[] = br.readLine().split(" ");

		long a = Long.parseLong(str[0]);
		long b = Long.parseLong(str[1]);
		long c = Long.parseLong(str[2]);
		long d = Long.parseLong(str[3]);

		if (b < 0 && d < 0) {
			System.out.println(a * c);
		} else if (a > 0 && c > 0) {
			System.out.println(b * d);
		} else {
			long A = a * c;
			long B = b * d;
			long C = a * d;
			long D = b * c;

			long max = Long.MIN_VALUE;
			max = Math.max(max, A);
			max = Math.max(max, B);
			max = Math.max(max, C);
			max = Math.max(max, D);
			System.out.println(max);
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String str[] = br.readLine().split(" "); str br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " long a = Long.parseLong(str[0]); a Long.parseLong(str[0]) Long.parseLong Long str[0] str 0 long b = Long.parseLong(str[1]); b Long.parseLong(str[1]) Long.parseLong Long str[1] str 1 long c = Long.parseLong(str[2]); c Long.parseLong(str[2]) Long.parseLong Long str[2] str 2 long d = Long.parseLong(str[3]); d Long.parseLong(str[3]) Long.parseLong Long str[3] str 3 if (b < 0 && d < 0) {
			System.out.println(a * c);
		} else if (a > 0 && c > 0) {
			System.out.println(b * d);
		} else {
			long A = a * c;
			long B = b * d;
			long C = a * d;
			long D = b * c;

			long max = Long.MIN_VALUE;
			max = Math.max(max, A);
			max = Math.max(max, B);
			max = Math.max(max, C);
			max = Math.max(max, D);
			System.out.println(max);
		} b < 0 && d < 0 b < 0 b 0 d < 0 d 0 {
			System.out.println(a * c);
		} System.out.println(a * c) System.out.println System.out System System.out a * c a c if (a > 0 && c > 0) {
			System.out.println(b * d);
		} else {
			long A = a * c;
			long B = b * d;
			long C = a * d;
			long D = b * c;

			long max = Long.MIN_VALUE;
			max = Math.max(max, A);
			max = Math.max(max, B);
			max = Math.max(max, C);
			max = Math.max(max, D);
			System.out.println(max);
		} a > 0 && c > 0 a > 0 a 0 c > 0 c 0 {
			System.out.println(b * d);
		} System.out.println(b * d) System.out.println System.out System System.out b * d b d {
			long A = a * c;
			long B = b * d;
			long C = a * d;
			long D = b * c;

			long max = Long.MIN_VALUE;
			max = Math.max(max, A);
			max = Math.max(max, B);
			max = Math.max(max, C);
			max = Math.max(max, D);
			System.out.println(max);
		} long A = a * c; A a * c a c long B = b * d; B b * d b d long C = a * d; C a * d a d long D = b * c; D b * c b c long max = Long.MIN_VALUE; max Long.MIN_VALUE Long Long.MIN_VALUE max = Math.max(max, A) max Math.max(max, A) Math.max Math max A max = Math.max(max, B) max Math.max(max, B) Math.max Math max B max = Math.max(max, C) max Math.max(max, C) Math.max Math max C max = Math.max(max, D) max Math.max(max, D) Math.max Math max D System.out.println(max) System.out.println System.out System System.out max String[] args args public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str[] = br.readLine().split(" ");

		long a = Long.parseLong(str[0]);
		long b = Long.parseLong(str[1]);
		long c = Long.parseLong(str[2]);
		long d = Long.parseLong(str[3]);

		if (b < 0 && d < 0) {
			System.out.println(a * c);
		} else if (a > 0 && c > 0) {
			System.out.println(b * d);
		} else {
			long A = a * c;
			long B = b * d;
			long C = a * d;
			long D = b * c;

			long max = Long.MIN_VALUE;
			max = Math.max(max, A);
			max = Math.max(max, B);
			max = Math.max(max, C);
			max = Math.max(max, D);
			System.out.println(max);
		}
	}
} public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str[] = br.readLine().split(" ");

		long a = Long.parseLong(str[0]);
		long b = Long.parseLong(str[1]);
		long c = Long.parseLong(str[2]);
		long d = Long.parseLong(str[3]);

		if (b < 0 && d < 0) {
			System.out.println(a * c);
		} else if (a > 0 && c > 0) {
			System.out.println(b * d);
		} else {
			long A = a * c;
			long B = b * d;
			long C = a * d;
			long D = b * c;

			long max = Long.MIN_VALUE;
			max = Math.max(max, A);
			max = Math.max(max, B);
			max = Math.max(max, C);
			max = Math.max(max, D);
			System.out.println(max);
		}
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Comparator;

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str[] = br.readLine().split(" ");

		long a = Long.parseLong(str[0]);
		long b = Long.parseLong(str[1]);
		long c = Long.parseLong(str[2]);
		long d = Long.parseLong(str[3]);

		if (b < 0 && d < 0) {
			System.out.println(a * c);
		} else if (a > 0 && c > 0) {
			System.out.println(b * d);
		} else {
			long A = a * c;
			long B = b * d;
			long C = a * d;
			long D = b * c;

			long max = Long.MIN_VALUE;
			max = Math.max(max, A);
			max = Math.max(max, B);
			max = Math.max(max, C);
			max = Math.max(max, D);
			System.out.println(max);
		}
	}
}