import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		long a=scan.nextLong();
		long b=scan.nextLong();
		long x=scan.nextLong();
		long y=scan.nextLong();
		long c=a*x;
		long d=a*y;
		long e=b*x;
		long f=b*y;
		long res=Math.max(Math.max(c, e), Math.max(d, f));
		System.out.println(res);
	
	
	}

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

	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		long a=scan.nextLong();
		long b=scan.nextLong();
		long x=scan.nextLong();
		long y=scan.nextLong();
		long c=a*x;
		long d=a*y;
		long e=b*x;
		long f=b*y;
		long res=Math.max(Math.max(c, e), Math.max(d, f));
		System.out.println(res);
	
	
	}

} Main public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		long a=scan.nextLong();
		long b=scan.nextLong();
		long x=scan.nextLong();
		long y=scan.nextLong();
		long c=a*x;
		long d=a*y;
		long e=b*x;
		long f=b*y;
		long res=Math.max(Math.max(c, e), Math.max(d, f));
		System.out.println(res);
	
	
	} main {
		Scanner scan=new Scanner(System.in);
		long a=scan.nextLong();
		long b=scan.nextLong();
		long x=scan.nextLong();
		long y=scan.nextLong();
		long c=a*x;
		long d=a*y;
		long e=b*x;
		long f=b*y;
		long res=Math.max(Math.max(c, e), Math.max(d, f));
		System.out.println(res);
	
	
	} Scanner scan=new Scanner(System.in); scan new Scanner(System.in) long a=scan.nextLong(); a scan.nextLong() scan.nextLong scan long b=scan.nextLong(); b scan.nextLong() scan.nextLong scan long x=scan.nextLong(); x scan.nextLong() scan.nextLong scan long y=scan.nextLong(); y scan.nextLong() scan.nextLong scan long c=a*x; c a*x a x long d=a*y; d a*y a y long e=b*x; e b*x b x long f=b*y; f b*y b y long res=Math.max(Math.max(c, e), Math.max(d, f)); res Math.max(Math.max(c, e), Math.max(d, f)) Math.max Math Math.max(c, e) Math.max Math c e Math.max(d, f) Math.max Math d f System.out.println(res) System.out.println System.out System System.out res String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		long a=scan.nextLong();
		long b=scan.nextLong();
		long x=scan.nextLong();
		long y=scan.nextLong();
		long c=a*x;
		long d=a*y;
		long e=b*x;
		long f=b*y;
		long res=Math.max(Math.max(c, e), Math.max(d, f));
		System.out.println(res);
	
	
	}

} public class Main {

	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		long a=scan.nextLong();
		long b=scan.nextLong();
		long x=scan.nextLong();
		long y=scan.nextLong();
		long c=a*x;
		long d=a*y;
		long e=b*x;
		long f=b*y;
		long res=Math.max(Math.max(c, e), Math.max(d, f));
		System.out.println(res);
	
	
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		long a=scan.nextLong();
		long b=scan.nextLong();
		long x=scan.nextLong();
		long y=scan.nextLong();
		long c=a*x;
		long d=a*y;
		long e=b*x;
		long f=b*y;
		long res=Math.max(Math.max(c, e), Math.max(d, f));
		System.out.println(res);
	
	
	}

}
