
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 x=0;
		
		if(b<=0 && c<=0) {
			x=a*c;
		}
		else if(a>=0&&d>=0){
			x=b*d;
		}
		else if(b<=0&&c>=0) {
			x=b*c;
		}
		else if(a>=0&&d<=0){
			x=a*d;
		}
		else if(a<=0&&b>=0&&c<=0&&d>=0) {
			if(a*c>=b*d) {
				x=a*c;
			}
			else {
				x=b*d;
			}
		}
		else if(a<=0&&b>=0&&d<=0) {
			x=a*c;
		}
		else if(a<=0&&b>=0&&c>=0) {
			x=b*d;
		}
		System.out.println(x);
		sc.close();
	}
} 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 x=0;
		
		if(b<=0 && c<=0) {
			x=a*c;
		}
		else if(a>=0&&d>=0){
			x=b*d;
		}
		else if(b<=0&&c>=0) {
			x=b*c;
		}
		else if(a>=0&&d<=0){
			x=a*d;
		}
		else if(a<=0&&b>=0&&c<=0&&d>=0) {
			if(a*c>=b*d) {
				x=a*c;
			}
			else {
				x=b*d;
			}
		}
		else if(a<=0&&b>=0&&d<=0) {
			x=a*c;
		}
		else if(a<=0&&b>=0&&c>=0) {
			x=b*d;
		}
		System.out.println(x);
		sc.close();
	}
} 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 x=0;
		
		if(b<=0 && c<=0) {
			x=a*c;
		}
		else if(a>=0&&d>=0){
			x=b*d;
		}
		else if(b<=0&&c>=0) {
			x=b*c;
		}
		else if(a>=0&&d<=0){
			x=a*d;
		}
		else if(a<=0&&b>=0&&c<=0&&d>=0) {
			if(a*c>=b*d) {
				x=a*c;
			}
			else {
				x=b*d;
			}
		}
		else if(a<=0&&b>=0&&d<=0) {
			x=a*c;
		}
		else if(a<=0&&b>=0&&c>=0) {
			x=b*d;
		}
		System.out.println(x);
		sc.close();
	} main {
		Scanner sc=new Scanner(System.in);
		long a=sc.nextLong();
		long b=sc.nextLong();
		long c=sc.nextLong();
		long d=sc.nextLong();
		
		long x=0;
		
		if(b<=0 && c<=0) {
			x=a*c;
		}
		else if(a>=0&&d>=0){
			x=b*d;
		}
		else if(b<=0&&c>=0) {
			x=b*c;
		}
		else if(a>=0&&d<=0){
			x=a*d;
		}
		else if(a<=0&&b>=0&&c<=0&&d>=0) {
			if(a*c>=b*d) {
				x=a*c;
			}
			else {
				x=b*d;
			}
		}
		else if(a<=0&&b>=0&&d<=0) {
			x=a*c;
		}
		else if(a<=0&&b>=0&&c>=0) {
			x=b*d;
		}
		System.out.println(x);
		sc.close();
	} 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 x=0; x 0 if(b<=0 && c<=0) {
			x=a*c;
		}
		else if(a>=0&&d>=0){
			x=b*d;
		}
		else if(b<=0&&c>=0) {
			x=b*c;
		}
		else if(a>=0&&d<=0){
			x=a*d;
		}
		else if(a<=0&&b>=0&&c<=0&&d>=0) {
			if(a*c>=b*d) {
				x=a*c;
			}
			else {
				x=b*d;
			}
		}
		else if(a<=0&&b>=0&&d<=0) {
			x=a*c;
		}
		else if(a<=0&&b>=0&&c>=0) {
			x=b*d;
		} b<=0 && c<=0 b<=0 b 0 c<=0 c 0 {
			x=a*c;
		} x=a*c x a*c a c if(a>=0&&d>=0){
			x=b*d;
		}
		else if(b<=0&&c>=0) {
			x=b*c;
		}
		else if(a>=0&&d<=0){
			x=a*d;
		}
		else if(a<=0&&b>=0&&c<=0&&d>=0) {
			if(a*c>=b*d) {
				x=a*c;
			}
			else {
				x=b*d;
			}
		}
		else if(a<=0&&b>=0&&d<=0) {
			x=a*c;
		}
		else if(a<=0&&b>=0&&c>=0) {
			x=b*d;
		} a>=0&&d>=0 a>=0 a 0 d>=0 d 0 {
			x=b*d;
		} x=b*d x b*d b d if(b<=0&&c>=0) {
			x=b*c;
		}
		else if(a>=0&&d<=0){
			x=a*d;
		}
		else if(a<=0&&b>=0&&c<=0&&d>=0) {
			if(a*c>=b*d) {
				x=a*c;
			}
			else {
				x=b*d;
			}
		}
		else if(a<=0&&b>=0&&d<=0) {
			x=a*c;
		}
		else if(a<=0&&b>=0&&c>=0) {
			x=b*d;
		} b<=0&&c>=0 b<=0 b 0 c>=0 c 0 {
			x=b*c;
		} x=b*c x b*c b c if(a>=0&&d<=0){
			x=a*d;
		}
		else if(a<=0&&b>=0&&c<=0&&d>=0) {
			if(a*c>=b*d) {
				x=a*c;
			}
			else {
				x=b*d;
			}
		}
		else if(a<=0&&b>=0&&d<=0) {
			x=a*c;
		}
		else if(a<=0&&b>=0&&c>=0) {
			x=b*d;
		} a>=0&&d<=0 a>=0 a 0 d<=0 d 0 {
			x=a*d;
		} x=a*d x a*d a d if(a<=0&&b>=0&&c<=0&&d>=0) {
			if(a*c>=b*d) {
				x=a*c;
			}
			else {
				x=b*d;
			}
		}
		else if(a<=0&&b>=0&&d<=0) {
			x=a*c;
		}
		else if(a<=0&&b>=0&&c>=0) {
			x=b*d;
		} a<=0&&b>=0&&c<=0&&d>=0 c<=0 a<=0&&b>=0&&c<=0&&d>=0 a<=0 a 0 b>=0 b 0 c<=0 c 0 d>=0 d 0 {
			if(a*c>=b*d) {
				x=a*c;
			}
			else {
				x=b*d;
			}
		} if(a*c>=b*d) {
				x=a*c;
			}
			else {
				x=b*d;
			} a*c>=b*d a*c a c b*d b d {
				x=a*c;
			} x=a*c x a*c a c {
				x=b*d;
			} x=b*d x b*d b d if(a<=0&&b>=0&&d<=0) {
			x=a*c;
		}
		else if(a<=0&&b>=0&&c>=0) {
			x=b*d;
		} a<=0&&b>=0&&d<=0 a<=0&&b>=0&&d<=0 a<=0 a 0 b>=0 b 0 d<=0 d 0 {
			x=a*c;
		} x=a*c x a*c a c if(a<=0&&b>=0&&c>=0) {
			x=b*d;
		} a<=0&&b>=0&&c>=0 a<=0&&b>=0&&c>=0 a<=0 a 0 b>=0 b 0 c>=0 c 0 {
			x=b*d;
		} x=b*d x b*d b d System.out.println(x) System.out.println System.out System System.out x sc.close() sc.close sc 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 x=0;
		
		if(b<=0 && c<=0) {
			x=a*c;
		}
		else if(a>=0&&d>=0){
			x=b*d;
		}
		else if(b<=0&&c>=0) {
			x=b*c;
		}
		else if(a>=0&&d<=0){
			x=a*d;
		}
		else if(a<=0&&b>=0&&c<=0&&d>=0) {
			if(a*c>=b*d) {
				x=a*c;
			}
			else {
				x=b*d;
			}
		}
		else if(a<=0&&b>=0&&d<=0) {
			x=a*c;
		}
		else if(a<=0&&b>=0&&c>=0) {
			x=b*d;
		}
		System.out.println(x);
		sc.close();
	}
} 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 x=0;
		
		if(b<=0 && c<=0) {
			x=a*c;
		}
		else if(a>=0&&d>=0){
			x=b*d;
		}
		else if(b<=0&&c>=0) {
			x=b*c;
		}
		else if(a>=0&&d<=0){
			x=a*d;
		}
		else if(a<=0&&b>=0&&c<=0&&d>=0) {
			if(a*c>=b*d) {
				x=a*c;
			}
			else {
				x=b*d;
			}
		}
		else if(a<=0&&b>=0&&d<=0) {
			x=a*c;
		}
		else if(a<=0&&b>=0&&c>=0) {
			x=b*d;
		}
		System.out.println(x);
		sc.close();
	}
} 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 x=0;
		
		if(b<=0 && c<=0) {
			x=a*c;
		}
		else if(a>=0&&d>=0){
			x=b*d;
		}
		else if(b<=0&&c>=0) {
			x=b*c;
		}
		else if(a>=0&&d<=0){
			x=a*d;
		}
		else if(a<=0&&b>=0&&c<=0&&d>=0) {
			if(a*c>=b*d) {
				x=a*c;
			}
			else {
				x=b*d;
			}
		}
		else if(a<=0&&b>=0&&d<=0) {
			x=a*c;
		}
		else if(a<=0&&b>=0&&c>=0) {
			x=b*d;
		}
		System.out.println(x);
		sc.close();
	}
}