import java.util.Arrays;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long a = sc.nextInt();
		long b = sc.nextInt();
		long c = sc.nextInt();
		long d = sc.nextInt();
		if (a>=0&&c>=0) {
			System.out.println(b*d);
		} else if (b<=0&&d<=0) {
			System.out.println(a*c);
		} else {
			long t[] = new long[4];
			t[0] = a*c;
			t[1] = a*d;
			t[2]= b*c;
			t[3] = b*d;
			Arrays.sort(t);
			if (t[3]>=0) {
				System.out.println(t[3]);
			} else {
				if ((b>0&&a<0)||(d>0&&c<0)) {
					System.out.println(0);
				} else {
					System.out.println(t[3]);
				}
			}
		}
	}
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long a = sc.nextInt();
		long b = sc.nextInt();
		long c = sc.nextInt();
		long d = sc.nextInt();
		if (a>=0&&c>=0) {
			System.out.println(b*d);
		} else if (b<=0&&d<=0) {
			System.out.println(a*c);
		} else {
			long t[] = new long[4];
			t[0] = a*c;
			t[1] = a*d;
			t[2]= b*c;
			t[3] = b*d;
			Arrays.sort(t);
			if (t[3]>=0) {
				System.out.println(t[3]);
			} else {
				if ((b>0&&a<0)||(d>0&&c<0)) {
					System.out.println(0);
				} else {
					System.out.println(t[3]);
				}
			}
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long a = sc.nextInt();
		long b = sc.nextInt();
		long c = sc.nextInt();
		long d = sc.nextInt();
		if (a>=0&&c>=0) {
			System.out.println(b*d);
		} else if (b<=0&&d<=0) {
			System.out.println(a*c);
		} else {
			long t[] = new long[4];
			t[0] = a*c;
			t[1] = a*d;
			t[2]= b*c;
			t[3] = b*d;
			Arrays.sort(t);
			if (t[3]>=0) {
				System.out.println(t[3]);
			} else {
				if ((b>0&&a<0)||(d>0&&c<0)) {
					System.out.println(0);
				} else {
					System.out.println(t[3]);
				}
			}
		}
	} main {
		Scanner sc = new Scanner(System.in);
		long a = sc.nextInt();
		long b = sc.nextInt();
		long c = sc.nextInt();
		long d = sc.nextInt();
		if (a>=0&&c>=0) {
			System.out.println(b*d);
		} else if (b<=0&&d<=0) {
			System.out.println(a*c);
		} else {
			long t[] = new long[4];
			t[0] = a*c;
			t[1] = a*d;
			t[2]= b*c;
			t[3] = b*d;
			Arrays.sort(t);
			if (t[3]>=0) {
				System.out.println(t[3]);
			} else {
				if ((b>0&&a<0)||(d>0&&c<0)) {
					System.out.println(0);
				} else {
					System.out.println(t[3]);
				}
			}
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) 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 if (a>=0&&c>=0) {
			System.out.println(b*d);
		} else if (b<=0&&d<=0) {
			System.out.println(a*c);
		} else {
			long t[] = new long[4];
			t[0] = a*c;
			t[1] = a*d;
			t[2]= b*c;
			t[3] = b*d;
			Arrays.sort(t);
			if (t[3]>=0) {
				System.out.println(t[3]);
			} else {
				if ((b>0&&a<0)||(d>0&&c<0)) {
					System.out.println(0);
				} else {
					System.out.println(t[3]);
				}
			}
		} a>=0&&c>=0 a>=0 a 0 c>=0 c 0 {
			System.out.println(b*d);
		} System.out.println(b*d) System.out.println System.out System System.out b*d b d if (b<=0&&d<=0) {
			System.out.println(a*c);
		} else {
			long t[] = new long[4];
			t[0] = a*c;
			t[1] = a*d;
			t[2]= b*c;
			t[3] = b*d;
			Arrays.sort(t);
			if (t[3]>=0) {
				System.out.println(t[3]);
			} else {
				if ((b>0&&a<0)||(d>0&&c<0)) {
					System.out.println(0);
				} else {
					System.out.println(t[3]);
				}
			}
		} b<=0&&d<=0 b<=0 b 0 d<=0 d 0 {
			System.out.println(a*c);
		} System.out.println(a*c) System.out.println System.out System System.out a*c a c {
			long t[] = new long[4];
			t[0] = a*c;
			t[1] = a*d;
			t[2]= b*c;
			t[3] = b*d;
			Arrays.sort(t);
			if (t[3]>=0) {
				System.out.println(t[3]);
			} else {
				if ((b>0&&a<0)||(d>0&&c<0)) {
					System.out.println(0);
				} else {
					System.out.println(t[3]);
				}
			}
		} long t[] = new long[4]; t new long[4] 4 t[0] = a*c t[0] t 0 a*c a c t[1] = a*d t[1] t 1 a*d a d t[2]= b*c t[2] t 2 b*c b c t[3] = b*d t[3] t 3 b*d b d Arrays.sort(t) Arrays.sort Arrays t if (t[3]>=0) {
				System.out.println(t[3]);
			} else {
				if ((b>0&&a<0)||(d>0&&c<0)) {
					System.out.println(0);
				} else {
					System.out.println(t[3]);
				}
			} t[3]>=0 t[3] t 3 0 {
				System.out.println(t[3]);
			} System.out.println(t[3]) System.out.println System.out System System.out t[3] t 3 {
				if ((b>0&&a<0)||(d>0&&c<0)) {
					System.out.println(0);
				} else {
					System.out.println(t[3]);
				}
			} if ((b>0&&a<0)||(d>0&&c<0)) {
					System.out.println(0);
				} else {
					System.out.println(t[3]);
				} (b>0&&a<0)||(d>0&&c<0) (b>0&&a<0) b>0 b 0 a<0 a 0 (d>0&&c<0) d>0 d 0 c<0 c 0 {
					System.out.println(0);
				} System.out.println(0) System.out.println System.out System System.out 0 {
					System.out.println(t[3]);
				} System.out.println(t[3]) System.out.println System.out System System.out t[3] t 3 String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long a = sc.nextInt();
		long b = sc.nextInt();
		long c = sc.nextInt();
		long d = sc.nextInt();
		if (a>=0&&c>=0) {
			System.out.println(b*d);
		} else if (b<=0&&d<=0) {
			System.out.println(a*c);
		} else {
			long t[] = new long[4];
			t[0] = a*c;
			t[1] = a*d;
			t[2]= b*c;
			t[3] = b*d;
			Arrays.sort(t);
			if (t[3]>=0) {
				System.out.println(t[3]);
			} else {
				if ((b>0&&a<0)||(d>0&&c<0)) {
					System.out.println(0);
				} else {
					System.out.println(t[3]);
				}
			}
		}
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long a = sc.nextInt();
		long b = sc.nextInt();
		long c = sc.nextInt();
		long d = sc.nextInt();
		if (a>=0&&c>=0) {
			System.out.println(b*d);
		} else if (b<=0&&d<=0) {
			System.out.println(a*c);
		} else {
			long t[] = new long[4];
			t[0] = a*c;
			t[1] = a*d;
			t[2]= b*c;
			t[3] = b*d;
			Arrays.sort(t);
			if (t[3]>=0) {
				System.out.println(t[3]);
			} else {
				if ((b>0&&a<0)||(d>0&&c<0)) {
					System.out.println(0);
				} else {
					System.out.println(t[3]);
				}
			}
		}
	}
} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long a = sc.nextInt();
		long b = sc.nextInt();
		long c = sc.nextInt();
		long d = sc.nextInt();
		if (a>=0&&c>=0) {
			System.out.println(b*d);
		} else if (b<=0&&d<=0) {
			System.out.println(a*c);
		} else {
			long t[] = new long[4];
			t[0] = a*c;
			t[1] = a*d;
			t[2]= b*c;
			t[3] = b*d;
			Arrays.sort(t);
			if (t[3]>=0) {
				System.out.println(t[3]);
			} else {
				if ((b>0&&a<0)||(d>0&&c<0)) {
					System.out.println(0);
				} else {
					System.out.println(t[3]);
				}
			}
		}
	}
}