import java.util.*;
 
 
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();

		long[] l = {a * c, a * d, b * c, b * d};

		Arrays.sort(l);

		System.out.println(l[3]);
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();

		long[] l = {a * c, a * d, b * c, b * d};

		Arrays.sort(l);

		System.out.println(l[3]);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();

		long[] l = {a * c, a * d, b * c, b * d};

		Arrays.sort(l);

		System.out.println(l[3]);
	} main {
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();

		long[] l = {a * c, a * d, b * c, b * d};

		Arrays.sort(l);

		System.out.println(l[3]);
	} 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[] l = {a * c, a * d, b * c, b * d}; l {a * c, a * d, b * c, b * d} a * c a c a * d a d b * c b c b * d b d Arrays.sort(l) Arrays.sort Arrays l System.out.println(l[3]) System.out.println System.out System System.out l[3] l 3 String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();

		long[] l = {a * c, a * d, b * c, b * d};

		Arrays.sort(l);

		System.out.println(l[3]);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();

		long[] l = {a * c, a * d, b * c, b * d};

		Arrays.sort(l);

		System.out.println(l[3]);
	}
} Main
import java.util.*;
 
 
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();

		long[] l = {a * c, a * d, b * c, b * d};

		Arrays.sort(l);

		System.out.println(l[3]);
	}
}