import java.util.Scanner;

public class Main {
	static long solve(long a , long b , long c , long d){
		long arr[] = {a , b , c , d};
		long ret = b * d;
		for(int i = 0 ; i < 2 ; ++i){
			for(int j = 2 ; j < 4 ; ++j){
				long x = arr[i] * arr[j];
				ret = Math.max(ret, x);
			}
		}
		return ret;
	}
	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();
		System.out.println(solve(a, b, c, d));
	}
} import java.util.Scanner; Scanner java.util public class Main {
	static long solve(long a , long b , long c , long d){
		long arr[] = {a , b , c , d};
		long ret = b * d;
		for(int i = 0 ; i < 2 ; ++i){
			for(int j = 2 ; j < 4 ; ++j){
				long x = arr[i] * arr[j];
				ret = Math.max(ret, x);
			}
		}
		return ret;
	}
	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();
		System.out.println(solve(a, b, c, d));
	}
} Main static long solve(long a , long b , long c , long d){
		long arr[] = {a , b , c , d};
		long ret = b * d;
		for(int i = 0 ; i < 2 ; ++i){
			for(int j = 2 ; j < 4 ; ++j){
				long x = arr[i] * arr[j];
				ret = Math.max(ret, x);
			}
		}
		return ret;
	} solve {
		long arr[] = {a , b , c , d};
		long ret = b * d;
		for(int i = 0 ; i < 2 ; ++i){
			for(int j = 2 ; j < 4 ; ++j){
				long x = arr[i] * arr[j];
				ret = Math.max(ret, x);
			}
		}
		return ret;
	} long arr[] = {a , b , c , d}; arr {a , b , c , d} a b c d long ret = b * d; ret b * d b d for(int i = 0 ; i < 2 ; ++i){
			for(int j = 2 ; j < 4 ; ++j){
				long x = arr[i] * arr[j];
				ret = Math.max(ret, x);
			}
		} int i = 0 ; int i = 0 ; i 0 i < 2 i 2 ++i ++i i {
			for(int j = 2 ; j < 4 ; ++j){
				long x = arr[i] * arr[j];
				ret = Math.max(ret, x);
			}
		} {
			for(int j = 2 ; j < 4 ; ++j){
				long x = arr[i] * arr[j];
				ret = Math.max(ret, x);
			}
		} for(int j = 2 ; j < 4 ; ++j){
				long x = arr[i] * arr[j];
				ret = Math.max(ret, x);
			} int j = 2 ; int j = 2 ; j 2 j < 4 j 4 ++j ++j j {
				long x = arr[i] * arr[j];
				ret = Math.max(ret, x);
			} {
				long x = arr[i] * arr[j];
				ret = Math.max(ret, x);
			} long x = arr[i] * arr[j]; x arr[i] * arr[j] arr[i] arr i arr[j] arr j ret = Math.max(ret, x) ret Math.max(ret, x) Math.max Math ret x return ret; ret long a a long b b long c c long d d 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();
		System.out.println(solve(a, b, c, d));
	} main {
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();
		System.out.println(solve(a, b, c, d));
	} 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 System.out.println(solve(a, b, c, d)) System.out.println System.out System System.out solve(a, b, c, d) solve a b c d String[] args args public class Main {
	static long solve(long a , long b , long c , long d){
		long arr[] = {a , b , c , d};
		long ret = b * d;
		for(int i = 0 ; i < 2 ; ++i){
			for(int j = 2 ; j < 4 ; ++j){
				long x = arr[i] * arr[j];
				ret = Math.max(ret, x);
			}
		}
		return ret;
	}
	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();
		System.out.println(solve(a, b, c, d));
	}
} public class Main {
	static long solve(long a , long b , long c , long d){
		long arr[] = {a , b , c , d};
		long ret = b * d;
		for(int i = 0 ; i < 2 ; ++i){
			for(int j = 2 ; j < 4 ; ++j){
				long x = arr[i] * arr[j];
				ret = Math.max(ret, x);
			}
		}
		return ret;
	}
	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();
		System.out.println(solve(a, b, c, d));
	}
} Main
import java.util.Scanner;

public class Main {
	static long solve(long a , long b , long c , long d){
		long arr[] = {a , b , c , d};
		long ret = b * d;
		for(int i = 0 ; i < 2 ; ++i){
			for(int j = 2 ; j < 4 ; ++j){
				long x = arr[i] * arr[j];
				ret = Math.max(ret, x);
			}
		}
		return ret;
	}
	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();
		System.out.println(solve(a, b, c, d));
	}
}
