import java.util.*;
public class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
			solve();
	}

	public static void solve() { 
		
		long a = sc.nextInt();
		long b = sc.nextInt();
		long c = sc.nextInt();
		long d = sc.nextInt();
		long max = Long.MIN_VALUE;
		long n1 = a * c;
		long n2 = a * d;
		long n3 = b * c;
		long n4 = b * d;
		max = Math.max(max, Math.max(n1, Math.max(n2, Math.max(n3, n4))));
		System.out.println(max);
	}
} import java.util.*; util.* java public class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
			solve();
	}

	public static void solve() { 
		
		long a = sc.nextInt();
		long b = sc.nextInt();
		long c = sc.nextInt();
		long d = sc.nextInt();
		long max = Long.MIN_VALUE;
		long n1 = a * c;
		long n2 = a * d;
		long n3 = b * c;
		long n4 = b * d;
		max = Math.max(max, Math.max(n1, Math.max(n2, Math.max(n3, n4))));
		System.out.println(max);
	}
} Main static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) {
			solve();
	} main {
			solve();
	} solve() solve String[] args args public static void solve() { 
		
		long a = sc.nextInt();
		long b = sc.nextInt();
		long c = sc.nextInt();
		long d = sc.nextInt();
		long max = Long.MIN_VALUE;
		long n1 = a * c;
		long n2 = a * d;
		long n3 = b * c;
		long n4 = b * d;
		max = Math.max(max, Math.max(n1, Math.max(n2, Math.max(n3, n4))));
		System.out.println(max);
	} solve { 
		
		long a = sc.nextInt();
		long b = sc.nextInt();
		long c = sc.nextInt();
		long d = sc.nextInt();
		long max = Long.MIN_VALUE;
		long n1 = a * c;
		long n2 = a * d;
		long n3 = b * c;
		long n4 = b * d;
		max = Math.max(max, Math.max(n1, Math.max(n2, Math.max(n3, n4))));
		System.out.println(max);
	} 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 max = Long.MIN_VALUE; max Long.MIN_VALUE Long Long.MIN_VALUE long n1 = a * c; n1 a * c a c long n2 = a * d; n2 a * d a d long n3 = b * c; n3 b * c b c long n4 = b * d; n4 b * d b d max = Math.max(max, Math.max(n1, Math.max(n2, Math.max(n3, n4)))) max Math.max(max, Math.max(n1, Math.max(n2, Math.max(n3, n4)))) Math.max Math max Math.max(n1, Math.max(n2, Math.max(n3, n4))) Math.max Math n1 Math.max(n2, Math.max(n3, n4)) Math.max Math n2 Math.max(n3, n4) Math.max Math n3 n4 System.out.println(max) System.out.println System.out System System.out max public class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
			solve();
	}

	public static void solve() { 
		
		long a = sc.nextInt();
		long b = sc.nextInt();
		long c = sc.nextInt();
		long d = sc.nextInt();
		long max = Long.MIN_VALUE;
		long n1 = a * c;
		long n2 = a * d;
		long n3 = b * c;
		long n4 = b * d;
		max = Math.max(max, Math.max(n1, Math.max(n2, Math.max(n3, n4))));
		System.out.println(max);
	}
} public class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
			solve();
	}

	public static void solve() { 
		
		long a = sc.nextInt();
		long b = sc.nextInt();
		long c = sc.nextInt();
		long d = sc.nextInt();
		long max = Long.MIN_VALUE;
		long n1 = a * c;
		long n2 = a * d;
		long n3 = b * c;
		long n4 = b * d;
		max = Math.max(max, Math.max(n1, Math.max(n2, Math.max(n3, n4))));
		System.out.println(max);
	}
} Main
import java.util.*;
public class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
			solve();
	}

	public static void solve() { 
		
		long a = sc.nextInt();
		long b = sc.nextInt();
		long c = sc.nextInt();
		long d = sc.nextInt();
		long max = Long.MIN_VALUE;
		long n1 = a * c;
		long n2 = a * d;
		long n3 = b * c;
		long n4 = b * d;
		max = Math.max(max, Math.max(n1, Math.max(n2, Math.max(n3, n4))));
		System.out.println(max);
	}
}