import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		long a = scan.nextLong();
		long b = scan.nextLong();
		long c = scan.nextLong();
		long d = scan.nextLong();

		long answer = Long.MIN_VALUE;

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

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

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		long a = scan.nextLong();
		long b = scan.nextLong();
		long c = scan.nextLong();
		long d = scan.nextLong();

		long answer = Long.MIN_VALUE;

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

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

		Scanner scan = new Scanner(System.in);
		long a = scan.nextLong();
		long b = scan.nextLong();
		long c = scan.nextLong();
		long d = scan.nextLong();

		long answer = Long.MIN_VALUE;

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

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

		Scanner scan = new Scanner(System.in);
		long a = scan.nextLong();
		long b = scan.nextLong();
		long c = scan.nextLong();
		long d = scan.nextLong();

		long answer = Long.MIN_VALUE;

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

		System.out.println(answer);
 	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) long a = scan.nextLong(); a scan.nextLong() scan.nextLong scan long b = scan.nextLong(); b scan.nextLong() scan.nextLong scan long c = scan.nextLong(); c scan.nextLong() scan.nextLong scan long d = scan.nextLong(); d scan.nextLong() scan.nextLong scan long answer = Long.MIN_VALUE; answer Long.MIN_VALUE Long Long.MIN_VALUE answer = Math.max(answer, a * c) answer Math.max(answer, a * c) Math.max Math answer a * c a c answer = Math.max(answer, b * c) answer Math.max(answer, b * c) Math.max Math answer b * c b c answer = Math.max(answer, a * d) answer Math.max(answer, a * d) Math.max Math answer a * d a d answer = Math.max(answer, b * d) answer Math.max(answer, b * d) Math.max Math answer b * d b d 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 scan = new Scanner(System.in);
		long a = scan.nextLong();
		long b = scan.nextLong();
		long c = scan.nextLong();
		long d = scan.nextLong();

		long answer = Long.MIN_VALUE;

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

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

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		long a = scan.nextLong();
		long b = scan.nextLong();
		long c = scan.nextLong();
		long d = scan.nextLong();

		long answer = Long.MIN_VALUE;

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

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

public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		long a = scan.nextLong();
		long b = scan.nextLong();
		long c = scan.nextLong();
		long d = scan.nextLong();

		long answer = Long.MIN_VALUE;

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

		System.out.println(answer);
 	}
}