import java.util.*;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long a = sc.nextInt();
		long b = sc.nextInt();
		long c = sc.nextInt();
		long d = sc.nextInt();
		if((a>=0&&b>=0)&&(c>=0&&d>=0)) {
			System.out.println( b*d );
		}else if((a>=0&&b>=0)&&(c<0&&d>=0)) {
			System.out.println( b*d );
		}else if((a>=0&&b>=0)&&(c<0&&d<0)) {
			System.out.println( a*d );
		}
		
		else if((a<0&&b>=0)&&(c>=0&&d>=0)) {
			System.out.println( b*d );
		}else if((a<0&&b>=0)&&(c<0&&d>=0)) {
			if (a*c<b*d) {
				System.out.println( b*d );
			}else {
				System.out.println( a*c );
			}
		}else if((a<0&&b>=0)&&(c<0&&d<0)) {
			System.out.println( a*c );
		}
		
		else if((a<0&&b<0)&&(c>=0&&d>=0)) {
			System.out.println( c*b );
		}else if((a<0&&b<0)&&(c<0&&d>=0)) {
			System.out.println( a*c );
		}else if((a<0&&b<0)&&(c<0&&d<0)) {
			System.out.println( a*c );
		}
		sc.close();
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long a = sc.nextInt();
		long b = sc.nextInt();
		long c = sc.nextInt();
		long d = sc.nextInt();
		if((a>=0&&b>=0)&&(c>=0&&d>=0)) {
			System.out.println( b*d );
		}else if((a>=0&&b>=0)&&(c<0&&d>=0)) {
			System.out.println( b*d );
		}else if((a>=0&&b>=0)&&(c<0&&d<0)) {
			System.out.println( a*d );
		}
		
		else if((a<0&&b>=0)&&(c>=0&&d>=0)) {
			System.out.println( b*d );
		}else if((a<0&&b>=0)&&(c<0&&d>=0)) {
			if (a*c<b*d) {
				System.out.println( b*d );
			}else {
				System.out.println( a*c );
			}
		}else if((a<0&&b>=0)&&(c<0&&d<0)) {
			System.out.println( a*c );
		}
		
		else if((a<0&&b<0)&&(c>=0&&d>=0)) {
			System.out.println( c*b );
		}else if((a<0&&b<0)&&(c<0&&d>=0)) {
			System.out.println( a*c );
		}else if((a<0&&b<0)&&(c<0&&d<0)) {
			System.out.println( a*c );
		}
		sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long a = sc.nextInt();
		long b = sc.nextInt();
		long c = sc.nextInt();
		long d = sc.nextInt();
		if((a>=0&&b>=0)&&(c>=0&&d>=0)) {
			System.out.println( b*d );
		}else if((a>=0&&b>=0)&&(c<0&&d>=0)) {
			System.out.println( b*d );
		}else if((a>=0&&b>=0)&&(c<0&&d<0)) {
			System.out.println( a*d );
		}
		
		else if((a<0&&b>=0)&&(c>=0&&d>=0)) {
			System.out.println( b*d );
		}else if((a<0&&b>=0)&&(c<0&&d>=0)) {
			if (a*c<b*d) {
				System.out.println( b*d );
			}else {
				System.out.println( a*c );
			}
		}else if((a<0&&b>=0)&&(c<0&&d<0)) {
			System.out.println( a*c );
		}
		
		else if((a<0&&b<0)&&(c>=0&&d>=0)) {
			System.out.println( c*b );
		}else if((a<0&&b<0)&&(c<0&&d>=0)) {
			System.out.println( a*c );
		}else if((a<0&&b<0)&&(c<0&&d<0)) {
			System.out.println( a*c );
		}
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		long a = sc.nextInt();
		long b = sc.nextInt();
		long c = sc.nextInt();
		long d = sc.nextInt();
		if((a>=0&&b>=0)&&(c>=0&&d>=0)) {
			System.out.println( b*d );
		}else if((a>=0&&b>=0)&&(c<0&&d>=0)) {
			System.out.println( b*d );
		}else if((a>=0&&b>=0)&&(c<0&&d<0)) {
			System.out.println( a*d );
		}
		
		else if((a<0&&b>=0)&&(c>=0&&d>=0)) {
			System.out.println( b*d );
		}else if((a<0&&b>=0)&&(c<0&&d>=0)) {
			if (a*c<b*d) {
				System.out.println( b*d );
			}else {
				System.out.println( a*c );
			}
		}else if((a<0&&b>=0)&&(c<0&&d<0)) {
			System.out.println( a*c );
		}
		
		else if((a<0&&b<0)&&(c>=0&&d>=0)) {
			System.out.println( c*b );
		}else if((a<0&&b<0)&&(c<0&&d>=0)) {
			System.out.println( a*c );
		}else if((a<0&&b<0)&&(c<0&&d<0)) {
			System.out.println( a*c );
		}
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long a = sc.nextInt(); a sc.nextInt() sc.nextInt sc long b = sc.nextInt(); b sc.nextInt() sc.nextInt sc long c = sc.nextInt(); c sc.nextInt() sc.nextInt sc long d = sc.nextInt(); d sc.nextInt() sc.nextInt sc if((a>=0&&b>=0)&&(c>=0&&d>=0)) {
			System.out.println( b*d );
		}else if((a>=0&&b>=0)&&(c<0&&d>=0)) {
			System.out.println( b*d );
		}else if((a>=0&&b>=0)&&(c<0&&d<0)) {
			System.out.println( a*d );
		}
		
		else if((a<0&&b>=0)&&(c>=0&&d>=0)) {
			System.out.println( b*d );
		}else if((a<0&&b>=0)&&(c<0&&d>=0)) {
			if (a*c<b*d) {
				System.out.println( b*d );
			}else {
				System.out.println( a*c );
			}
		}else if((a<0&&b>=0)&&(c<0&&d<0)) {
			System.out.println( a*c );
		}
		
		else if((a<0&&b<0)&&(c>=0&&d>=0)) {
			System.out.println( c*b );
		}else if((a<0&&b<0)&&(c<0&&d>=0)) {
			System.out.println( a*c );
		}else if((a<0&&b<0)&&(c<0&&d<0)) {
			System.out.println( a*c );
		} (a>=0&&b>=0)&&(c>=0&&d>=0) (a>=0&&b>=0) a>=0 a 0 b>=0 b 0 (c>=0&&d>=0) c>=0 c 0 d>=0 d 0 {
			System.out.println( b*d );
		} System.out.println( b*d ) System.out.println System.out System System.out b*d b d if((a>=0&&b>=0)&&(c<0&&d>=0)) {
			System.out.println( b*d );
		}else if((a>=0&&b>=0)&&(c<0&&d<0)) {
			System.out.println( a*d );
		}
		
		else if((a<0&&b>=0)&&(c>=0&&d>=0)) {
			System.out.println( b*d );
		}else if((a<0&&b>=0)&&(c<0&&d>=0)) {
			if (a*c<b*d) {
				System.out.println( b*d );
			}else {
				System.out.println( a*c );
			}
		}else if((a<0&&b>=0)&&(c<0&&d<0)) {
			System.out.println( a*c );
		}
		
		else if((a<0&&b<0)&&(c>=0&&d>=0)) {
			System.out.println( c*b );
		}else if((a<0&&b<0)&&(c<0&&d>=0)) {
			System.out.println( a*c );
		}else if((a<0&&b<0)&&(c<0&&d<0)) {
			System.out.println( a*c );
		} (a>=0&&b>=0)&&(c<0&&d>=0) (a>=0&&b>=0) a>=0 a 0 b>=0 b 0 (c<0&&d>=0) c<0 c 0 d>=0 d 0 {
			System.out.println( b*d );
		} System.out.println( b*d ) System.out.println System.out System System.out b*d b d if((a>=0&&b>=0)&&(c<0&&d<0)) {
			System.out.println( a*d );
		}
		
		else if((a<0&&b>=0)&&(c>=0&&d>=0)) {
			System.out.println( b*d );
		}else if((a<0&&b>=0)&&(c<0&&d>=0)) {
			if (a*c<b*d) {
				System.out.println( b*d );
			}else {
				System.out.println( a*c );
			}
		}else if((a<0&&b>=0)&&(c<0&&d<0)) {
			System.out.println( a*c );
		}
		
		else if((a<0&&b<0)&&(c>=0&&d>=0)) {
			System.out.println( c*b );
		}else if((a<0&&b<0)&&(c<0&&d>=0)) {
			System.out.println( a*c );
		}else if((a<0&&b<0)&&(c<0&&d<0)) {
			System.out.println( a*c );
		} (a>=0&&b>=0)&&(c<0&&d<0) (a>=0&&b>=0) a>=0 a 0 b>=0 b 0 (c<0&&d<0) c<0 c 0 d<0 d 0 {
			System.out.println( a*d );
		} System.out.println( a*d ) System.out.println System.out System System.out a*d a d if((a<0&&b>=0)&&(c>=0&&d>=0)) {
			System.out.println( b*d );
		}else if((a<0&&b>=0)&&(c<0&&d>=0)) {
			if (a*c<b*d) {
				System.out.println( b*d );
			}else {
				System.out.println( a*c );
			}
		}else if((a<0&&b>=0)&&(c<0&&d<0)) {
			System.out.println( a*c );
		}
		
		else if((a<0&&b<0)&&(c>=0&&d>=0)) {
			System.out.println( c*b );
		}else if((a<0&&b<0)&&(c<0&&d>=0)) {
			System.out.println( a*c );
		}else if((a<0&&b<0)&&(c<0&&d<0)) {
			System.out.println( a*c );
		} (a<0&&b>=0)&&(c>=0&&d>=0) (a<0&&b>=0) a<0 a 0 b>=0 b 0 (c>=0&&d>=0) c>=0 c 0 d>=0 d 0 {
			System.out.println( b*d );
		} System.out.println( b*d ) System.out.println System.out System System.out b*d b d if((a<0&&b>=0)&&(c<0&&d>=0)) {
			if (a*c<b*d) {
				System.out.println( b*d );
			}else {
				System.out.println( a*c );
			}
		}else if((a<0&&b>=0)&&(c<0&&d<0)) {
			System.out.println( a*c );
		}
		
		else if((a<0&&b<0)&&(c>=0&&d>=0)) {
			System.out.println( c*b );
		}else if((a<0&&b<0)&&(c<0&&d>=0)) {
			System.out.println( a*c );
		}else if((a<0&&b<0)&&(c<0&&d<0)) {
			System.out.println( a*c );
		} (a<0&&b>=0)&&(c<0&&d>=0) (a<0&&b>=0) a<0 a 0 b>=0 b 0 (c<0&&d>=0) c<0 c 0 d>=0 d 0 {
			if (a*c<b*d) {
				System.out.println( b*d );
			}else {
				System.out.println( a*c );
			}
		} if (a*c<b*d) {
				System.out.println( b*d );
			}else {
				System.out.println( a*c );
			} a*c<b*d a*c a c b*d b d {
				System.out.println( b*d );
			} System.out.println( b*d ) System.out.println System.out System System.out b*d b d {
				System.out.println( a*c );
			} System.out.println( a*c ) System.out.println System.out System System.out a*c a c if((a<0&&b>=0)&&(c<0&&d<0)) {
			System.out.println( a*c );
		}
		
		else if((a<0&&b<0)&&(c>=0&&d>=0)) {
			System.out.println( c*b );
		}else if((a<0&&b<0)&&(c<0&&d>=0)) {
			System.out.println( a*c );
		}else if((a<0&&b<0)&&(c<0&&d<0)) {
			System.out.println( a*c );
		} (a<0&&b>=0)&&(c<0&&d<0) (a<0&&b>=0) a<0 a 0 b>=0 b 0 (c<0&&d<0) c<0 c 0 d<0 d 0 {
			System.out.println( a*c );
		} System.out.println( a*c ) System.out.println System.out System System.out a*c a c if((a<0&&b<0)&&(c>=0&&d>=0)) {
			System.out.println( c*b );
		}else if((a<0&&b<0)&&(c<0&&d>=0)) {
			System.out.println( a*c );
		}else if((a<0&&b<0)&&(c<0&&d<0)) {
			System.out.println( a*c );
		} (a<0&&b<0)&&(c>=0&&d>=0) (a<0&&b<0) a<0 a 0 b<0 b 0 (c>=0&&d>=0) c>=0 c 0 d>=0 d 0 {
			System.out.println( c*b );
		} System.out.println( c*b ) System.out.println System.out System System.out c*b c b if((a<0&&b<0)&&(c<0&&d>=0)) {
			System.out.println( a*c );
		}else if((a<0&&b<0)&&(c<0&&d<0)) {
			System.out.println( a*c );
		} (a<0&&b<0)&&(c<0&&d>=0) (a<0&&b<0) a<0 a 0 b<0 b 0 (c<0&&d>=0) c<0 c 0 d>=0 d 0 {
			System.out.println( a*c );
		} System.out.println( a*c ) System.out.println System.out System System.out a*c a c if((a<0&&b<0)&&(c<0&&d<0)) {
			System.out.println( a*c );
		} (a<0&&b<0)&&(c<0&&d<0) (a<0&&b<0) a<0 a 0 b<0 b 0 (c<0&&d<0) c<0 c 0 d<0 d 0 {
			System.out.println( a*c );
		} System.out.println( a*c ) System.out.println System.out System System.out a*c a c 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.nextInt();
		long b = sc.nextInt();
		long c = sc.nextInt();
		long d = sc.nextInt();
		if((a>=0&&b>=0)&&(c>=0&&d>=0)) {
			System.out.println( b*d );
		}else if((a>=0&&b>=0)&&(c<0&&d>=0)) {
			System.out.println( b*d );
		}else if((a>=0&&b>=0)&&(c<0&&d<0)) {
			System.out.println( a*d );
		}
		
		else if((a<0&&b>=0)&&(c>=0&&d>=0)) {
			System.out.println( b*d );
		}else if((a<0&&b>=0)&&(c<0&&d>=0)) {
			if (a*c<b*d) {
				System.out.println( b*d );
			}else {
				System.out.println( a*c );
			}
		}else if((a<0&&b>=0)&&(c<0&&d<0)) {
			System.out.println( a*c );
		}
		
		else if((a<0&&b<0)&&(c>=0&&d>=0)) {
			System.out.println( c*b );
		}else if((a<0&&b<0)&&(c<0&&d>=0)) {
			System.out.println( a*c );
		}else if((a<0&&b<0)&&(c<0&&d<0)) {
			System.out.println( a*c );
		}
		sc.close();
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long a = sc.nextInt();
		long b = sc.nextInt();
		long c = sc.nextInt();
		long d = sc.nextInt();
		if((a>=0&&b>=0)&&(c>=0&&d>=0)) {
			System.out.println( b*d );
		}else if((a>=0&&b>=0)&&(c<0&&d>=0)) {
			System.out.println( b*d );
		}else if((a>=0&&b>=0)&&(c<0&&d<0)) {
			System.out.println( a*d );
		}
		
		else if((a<0&&b>=0)&&(c>=0&&d>=0)) {
			System.out.println( b*d );
		}else if((a<0&&b>=0)&&(c<0&&d>=0)) {
			if (a*c<b*d) {
				System.out.println( b*d );
			}else {
				System.out.println( a*c );
			}
		}else if((a<0&&b>=0)&&(c<0&&d<0)) {
			System.out.println( a*c );
		}
		
		else if((a<0&&b<0)&&(c>=0&&d>=0)) {
			System.out.println( c*b );
		}else if((a<0&&b<0)&&(c<0&&d>=0)) {
			System.out.println( a*c );
		}else if((a<0&&b<0)&&(c<0&&d<0)) {
			System.out.println( a*c );
		}
		sc.close();
	}
} Main
import java.util.*;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long a = sc.nextInt();
		long b = sc.nextInt();
		long c = sc.nextInt();
		long d = sc.nextInt();
		if((a>=0&&b>=0)&&(c>=0&&d>=0)) {
			System.out.println( b*d );
		}else if((a>=0&&b>=0)&&(c<0&&d>=0)) {
			System.out.println( b*d );
		}else if((a>=0&&b>=0)&&(c<0&&d<0)) {
			System.out.println( a*d );
		}
		
		else if((a<0&&b>=0)&&(c>=0&&d>=0)) {
			System.out.println( b*d );
		}else if((a<0&&b>=0)&&(c<0&&d>=0)) {
			if (a*c<b*d) {
				System.out.println( b*d );
			}else {
				System.out.println( a*c );
			}
		}else if((a<0&&b>=0)&&(c<0&&d<0)) {
			System.out.println( a*c );
		}
		
		else if((a<0&&b<0)&&(c>=0&&d>=0)) {
			System.out.println( c*b );
		}else if((a<0&&b<0)&&(c<0&&d>=0)) {
			System.out.println( a*c );
		}else if((a<0&&b<0)&&(c<0&&d<0)) {
			System.out.println( a*c );
		}
		sc.close();
	}
}