import 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();       
		System.out.println(Math.max(Math.max(a*c,a*d),Math.max(b*c,b*d)));
	}
} import java.util.*; util.* java 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();       
		System.out.println(Math.max(Math.max(a*c,a*d),Math.max(b*c,b*d)));
	}
} 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();       
		System.out.println(Math.max(Math.max(a*c,a*d),Math.max(b*c,b*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(Math.max(Math.max(a*c,a*d),Math.max(b*c,b*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(Math.max(Math.max(a*c,a*d),Math.max(b*c,b*d))) System.out.println System.out System System.out Math.max(Math.max(a*c,a*d),Math.max(b*c,b*d)) Math.max Math Math.max(a*c,a*d) Math.max Math a*c a c a*d a d Math.max(b*c,b*d) Math.max Math b*c b c b*d b d 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();       
		System.out.println(Math.max(Math.max(a*c,a*d),Math.max(b*c,b*d)));
	}
} 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();       
		System.out.println(Math.max(Math.max(a*c,a*d),Math.max(b*c,b*d)));
	}
} Main
import 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();       
		System.out.println(Math.max(Math.max(a*c,a*d),Math.max(b*c,b*d)));
	}
}