import java.util.Scanner;
 
public class Main {
	public static void main (String[] args) {
		Scanner in = new Scanner(System.in);
		long a = in.nextLong();
		long b = in.nextLong();
		long c = in.nextLong();
		long d = in.nextLong();
		long prod = Long.MIN_VALUE;
      prod = Math.max(prod, b*d);
      prod = Math.max(prod, a*c);
        prod = Math.max(prod, Math.min(b,d) * Math.max(a,c));
      System.out.println(prod);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main (String[] args) {
		Scanner in = new Scanner(System.in);
		long a = in.nextLong();
		long b = in.nextLong();
		long c = in.nextLong();
		long d = in.nextLong();
		long prod = Long.MIN_VALUE;
      prod = Math.max(prod, b*d);
      prod = Math.max(prod, a*c);
        prod = Math.max(prod, Math.min(b,d) * Math.max(a,c));
      System.out.println(prod);
	}
} Main public static void main (String[] args) {
		Scanner in = new Scanner(System.in);
		long a = in.nextLong();
		long b = in.nextLong();
		long c = in.nextLong();
		long d = in.nextLong();
		long prod = Long.MIN_VALUE;
      prod = Math.max(prod, b*d);
      prod = Math.max(prod, a*c);
        prod = Math.max(prod, Math.min(b,d) * Math.max(a,c));
      System.out.println(prod);
	} main {
		Scanner in = new Scanner(System.in);
		long a = in.nextLong();
		long b = in.nextLong();
		long c = in.nextLong();
		long d = in.nextLong();
		long prod = Long.MIN_VALUE;
      prod = Math.max(prod, b*d);
      prod = Math.max(prod, a*c);
        prod = Math.max(prod, Math.min(b,d) * Math.max(a,c));
      System.out.println(prod);
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) long a = in.nextLong(); a in.nextLong() in.nextLong in long b = in.nextLong(); b in.nextLong() in.nextLong in long c = in.nextLong(); c in.nextLong() in.nextLong in long d = in.nextLong(); d in.nextLong() in.nextLong in long prod = Long.MIN_VALUE; prod Long.MIN_VALUE Long Long.MIN_VALUE prod = Math.max(prod, b*d) prod Math.max(prod, b*d) Math.max Math prod b*d b d prod = Math.max(prod, a*c) prod Math.max(prod, a*c) Math.max Math prod a*c a c prod = Math.max(prod, Math.min(b,d) * Math.max(a,c)) prod Math.max(prod, Math.min(b,d) * Math.max(a,c)) Math.max Math prod Math.min(b,d) * Math.max(a,c) Math.min(b,d) Math.min Math b d Math.max(a,c) Math.max Math a c System.out.println(prod) System.out.println System.out System System.out prod String[] args args public class Main {
	public static void main (String[] args) {
		Scanner in = new Scanner(System.in);
		long a = in.nextLong();
		long b = in.nextLong();
		long c = in.nextLong();
		long d = in.nextLong();
		long prod = Long.MIN_VALUE;
      prod = Math.max(prod, b*d);
      prod = Math.max(prod, a*c);
        prod = Math.max(prod, Math.min(b,d) * Math.max(a,c));
      System.out.println(prod);
	}
} public class Main {
	public static void main (String[] args) {
		Scanner in = new Scanner(System.in);
		long a = in.nextLong();
		long b = in.nextLong();
		long c = in.nextLong();
		long d = in.nextLong();
		long prod = Long.MIN_VALUE;
      prod = Math.max(prod, b*d);
      prod = Math.max(prod, a*c);
        prod = Math.max(prod, Math.min(b,d) * Math.max(a,c));
      System.out.println(prod);
	}
} Main
import java.util.Scanner;
 
public class Main {
	public static void main (String[] args) {
		Scanner in = new Scanner(System.in);
		long a = in.nextLong();
		long b = in.nextLong();
		long c = in.nextLong();
		long d = in.nextLong();
		long prod = Long.MIN_VALUE;
      prod = Math.max(prod, b*d);
      prod = Math.max(prod, a*c);
        prod = Math.max(prod, Math.min(b,d) * Math.max(a,c));
      System.out.println(prod);
	}
}