import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();
		solve(a, b, c, d);
	}

	private static void solve(long a, long b, long c, long d) {
		// TODO Auto-generated method stub
		long ans = Long.MIN_VALUE;
		ans = Math.max(ans, a * c);
		ans = Math.max(ans, b * d);
		for (long i = b; i >= a; i--) {
			for (long j = d; j >= c; j--) {
				long t = i * j;
				if (ans > t) break;
				else {
					ans = Math.max(ans, t);
				}
			}
		}
		System.out.println(ans);
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();
		solve(a, b, c, d);
	}

	private static void solve(long a, long b, long c, long d) {
		// TODO Auto-generated method stub
		long ans = Long.MIN_VALUE;
		ans = Math.max(ans, a * c);
		ans = Math.max(ans, b * d);
		for (long i = b; i >= a; i--) {
			for (long j = d; j >= c; j--) {
				long t = i * j;
				if (ans > t) break;
				else {
					ans = Math.max(ans, t);
				}
			}
		}
		System.out.println(ans);
	}

} Main public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();
		solve(a, b, c, d);
	} main {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();
		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 solve(a, b, c, d) solve a b c d String[] args args private static void solve(long a, long b, long c, long d) {
		// TODO Auto-generated method stub
		long ans = Long.MIN_VALUE;
		ans = Math.max(ans, a * c);
		ans = Math.max(ans, b * d);
		for (long i = b; i >= a; i--) {
			for (long j = d; j >= c; j--) {
				long t = i * j;
				if (ans > t) break;
				else {
					ans = Math.max(ans, t);
				}
			}
		}
		System.out.println(ans);
	} solve {
		// TODO Auto-generated method stub
		long ans = Long.MIN_VALUE;
		ans = Math.max(ans, a * c);
		ans = Math.max(ans, b * d);
		for (long i = b; i >= a; i--) {
			for (long j = d; j >= c; j--) {
				long t = i * j;
				if (ans > t) break;
				else {
					ans = Math.max(ans, t);
				}
			}
		}
		System.out.println(ans);
	} long ans = Long.MIN_VALUE; ans Long.MIN_VALUE Long Long.MIN_VALUE ans = Math.max(ans, a * c) ans Math.max(ans, a * c) Math.max Math ans a * c a c ans = Math.max(ans, b * d) ans Math.max(ans, b * d) Math.max Math ans b * d b d for (long i = b; i >= a; i--) {
			for (long j = d; j >= c; j--) {
				long t = i * j;
				if (ans > t) break;
				else {
					ans = Math.max(ans, t);
				}
			}
		} long i = b; long i = b; i b i >= a i a i-- i-- i {
			for (long j = d; j >= c; j--) {
				long t = i * j;
				if (ans > t) break;
				else {
					ans = Math.max(ans, t);
				}
			}
		} {
			for (long j = d; j >= c; j--) {
				long t = i * j;
				if (ans > t) break;
				else {
					ans = Math.max(ans, t);
				}
			}
		} for (long j = d; j >= c; j--) {
				long t = i * j;
				if (ans > t) break;
				else {
					ans = Math.max(ans, t);
				}
			} long j = d; long j = d; j d j >= c j c j-- j-- j {
				long t = i * j;
				if (ans > t) break;
				else {
					ans = Math.max(ans, t);
				}
			} {
				long t = i * j;
				if (ans > t) break;
				else {
					ans = Math.max(ans, t);
				}
			} long t = i * j; t i * j i j if (ans > t) break;
				else {
					ans = Math.max(ans, t);
				} ans > t ans t break; {
					ans = Math.max(ans, t);
				} ans = Math.max(ans, t) ans Math.max(ans, t) Math.max Math ans t System.out.println(ans) System.out.println System.out System System.out ans long a a long b b long c c long d d public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();
		solve(a, b, c, d);
	}

	private static void solve(long a, long b, long c, long d) {
		// TODO Auto-generated method stub
		long ans = Long.MIN_VALUE;
		ans = Math.max(ans, a * c);
		ans = Math.max(ans, b * d);
		for (long i = b; i >= a; i--) {
			for (long j = d; j >= c; j--) {
				long t = i * j;
				if (ans > t) break;
				else {
					ans = Math.max(ans, t);
				}
			}
		}
		System.out.println(ans);
	}

} public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();
		solve(a, b, c, d);
	}

	private static void solve(long a, long b, long c, long d) {
		// TODO Auto-generated method stub
		long ans = Long.MIN_VALUE;
		ans = Math.max(ans, a * c);
		ans = Math.max(ans, b * d);
		for (long i = b; i >= a; i--) {
			for (long j = d; j >= c; j--) {
				long t = i * j;
				if (ans > t) break;
				else {
					ans = Math.max(ans, t);
				}
			}
		}
		System.out.println(ans);
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();
		solve(a, b, c, d);
	}

	private static void solve(long a, long b, long c, long d) {
		// TODO Auto-generated method stub
		long ans = Long.MIN_VALUE;
		ans = Math.max(ans, a * c);
		ans = Math.max(ans, b * d);
		for (long i = b; i >= a; i--) {
			for (long j = d; j >= c; j--) {
				long t = i * j;
				if (ans > t) break;
				else {
					ans = Math.max(ans, t);
				}
			}
		}
		System.out.println(ans);
	}

}
