import java.util.Scanner;

public class Main {
	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();

		long x1 = a*c;
		long x2 = a*d;
		long x3 = b*c;
		long x4 = b*d;

		long ans = Math.max(x1,x2);
		ans=Math.max(ans, x3);
		ans=Math.max(ans, x4);
			System.out.println(ans);
		
	}
} 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.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();

		long x1 = a*c;
		long x2 = a*d;
		long x3 = b*c;
		long x4 = b*d;

		long ans = Math.max(x1,x2);
		ans=Math.max(ans, x3);
		ans=Math.max(ans, x4);
			System.out.println(ans);
		
	}
} Main 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();

		long x1 = a*c;
		long x2 = a*d;
		long x3 = b*c;
		long x4 = b*d;

		long ans = Math.max(x1,x2);
		ans=Math.max(ans, x3);
		ans=Math.max(ans, x4);
			System.out.println(ans);
		
	} main {
		Scanner sc = new Scanner(System.in);

		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();

		long x1 = a*c;
		long x2 = a*d;
		long x3 = b*c;
		long x4 = b*d;

		long ans = Math.max(x1,x2);
		ans=Math.max(ans, x3);
		ans=Math.max(ans, x4);
			System.out.println(ans);
		
	} 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 long x1 = a*c; x1 a*c a c long x2 = a*d; x2 a*d a d long x3 = b*c; x3 b*c b c long x4 = b*d; x4 b*d b d long ans = Math.max(x1,x2); ans Math.max(x1,x2) Math.max Math x1 x2 ans=Math.max(ans, x3) ans Math.max(ans, x3) Math.max Math ans x3 ans=Math.max(ans, x4) ans Math.max(ans, x4) Math.max Math ans x4 System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
	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();

		long x1 = a*c;
		long x2 = a*d;
		long x3 = b*c;
		long x4 = b*d;

		long ans = Math.max(x1,x2);
		ans=Math.max(ans, x3);
		ans=Math.max(ans, x4);
			System.out.println(ans);
		
	}
} public class Main {
	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();

		long x1 = a*c;
		long x2 = a*d;
		long x3 = b*c;
		long x4 = b*d;

		long ans = Math.max(x1,x2);
		ans=Math.max(ans, x3);
		ans=Math.max(ans, x4);
			System.out.println(ans);
		
	}
} Main
import java.util.Scanner;

public class Main {
	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();

		long x1 = a*c;
		long x2 = a*d;
		long x3 = b*c;
		long x4 = b*d;

		long ans = Math.max(x1,x2);
		ans=Math.max(ans, x3);
		ans=Math.max(ans, x4);
			System.out.println(ans);
		
	}
}