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 x = a * c;
		long y = a * d;
		long z = b * c;
		long w = b * d;
		long max = Math.max(x, Math.max(y, Math.max(z, w)));

		if (a <= 0 && 0 <= b) {
			max = Math.max(max, 0);
		}

		if (c <= 0 && 0 <= d) {
			max = Math.max(max, 0);
		}

		System.out.println(max);

		sc.close();

	}
} 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 x = a * c;
		long y = a * d;
		long z = b * c;
		long w = b * d;
		long max = Math.max(x, Math.max(y, Math.max(z, w)));

		if (a <= 0 && 0 <= b) {
			max = Math.max(max, 0);
		}

		if (c <= 0 && 0 <= d) {
			max = Math.max(max, 0);
		}

		System.out.println(max);

		sc.close();

	}
} 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 x = a * c;
		long y = a * d;
		long z = b * c;
		long w = b * d;
		long max = Math.max(x, Math.max(y, Math.max(z, w)));

		if (a <= 0 && 0 <= b) {
			max = Math.max(max, 0);
		}

		if (c <= 0 && 0 <= d) {
			max = Math.max(max, 0);
		}

		System.out.println(max);

		sc.close();

	} main {
		Scanner sc = new Scanner(System.in);
		long a = sc.nextInt();
		long b = sc.nextInt();
		long c = sc.nextInt();
		long d = sc.nextInt();

		long x = a * c;
		long y = a * d;
		long z = b * c;
		long w = b * d;
		long max = Math.max(x, Math.max(y, Math.max(z, w)));

		if (a <= 0 && 0 <= b) {
			max = Math.max(max, 0);
		}

		if (c <= 0 && 0 <= d) {
			max = Math.max(max, 0);
		}

		System.out.println(max);

		sc.close();

	} 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 x = a * c; x a * c a c long y = a * d; y a * d a d long z = b * c; z b * c b c long w = b * d; w b * d b d long max = Math.max(x, Math.max(y, Math.max(z, w))); max Math.max(x, Math.max(y, Math.max(z, w))) Math.max Math x Math.max(y, Math.max(z, w)) Math.max Math y Math.max(z, w) Math.max Math z w if (a <= 0 && 0 <= b) {
			max = Math.max(max, 0);
		} a <= 0 && 0 <= b a <= 0 a 0 0 <= b 0 b {
			max = Math.max(max, 0);
		} max = Math.max(max, 0) max Math.max(max, 0) Math.max Math max 0 if (c <= 0 && 0 <= d) {
			max = Math.max(max, 0);
		} c <= 0 && 0 <= d c <= 0 c 0 0 <= d 0 d {
			max = Math.max(max, 0);
		} max = Math.max(max, 0) max Math.max(max, 0) Math.max Math max 0 System.out.println(max) System.out.println System.out System System.out max sc.close() sc.close sc 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 x = a * c;
		long y = a * d;
		long z = b * c;
		long w = b * d;
		long max = Math.max(x, Math.max(y, Math.max(z, w)));

		if (a <= 0 && 0 <= b) {
			max = Math.max(max, 0);
		}

		if (c <= 0 && 0 <= d) {
			max = Math.max(max, 0);
		}

		System.out.println(max);

		sc.close();

	}
} 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 x = a * c;
		long y = a * d;
		long z = b * c;
		long w = b * d;
		long max = Math.max(x, Math.max(y, Math.max(z, w)));

		if (a <= 0 && 0 <= b) {
			max = Math.max(max, 0);
		}

		if (c <= 0 && 0 <= d) {
			max = Math.max(max, 0);
		}

		System.out.println(max);

		sc.close();

	}
} 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 x = a * c;
		long y = a * d;
		long z = b * c;
		long w = b * d;
		long max = Math.max(x, Math.max(y, Math.max(z, w)));

		if (a <= 0 && 0 <= b) {
			max = Math.max(max, 0);
		}

		if (c <= 0 && 0 <= d) {
			max = Math.max(max, 0);
		}

		System.out.println(max);

		sc.close();

	}
}
