import java.util.*;
import java.math.RoundingMode;
import java.math.BigDecimal;
 
 
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();
		long ac = a*c;
		long ad = a*d;
		long bc = b*c;
		long bd = b*d;
		long r = 0;
		long l = 0;
		if(ac-ad>0) {
			r = ac;
		}
		else {
			r = ad;
		}
		if(bc-bd>0) {
			l = bc;
		}
		else {
			l = bd;
		}
		System.out.println(Math.max((long)r, (long)l));
		
	}
} import java.util.*; util.* java import java.math.RoundingMode; RoundingMode java.math import java.math.BigDecimal; BigDecimal java.math 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();
		long ac = a*c;
		long ad = a*d;
		long bc = b*c;
		long bd = b*d;
		long r = 0;
		long l = 0;
		if(ac-ad>0) {
			r = ac;
		}
		else {
			r = ad;
		}
		if(bc-bd>0) {
			l = bc;
		}
		else {
			l = bd;
		}
		System.out.println(Math.max((long)r, (long)l));
		
	}
} 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();
		long ac = a*c;
		long ad = a*d;
		long bc = b*c;
		long bd = b*d;
		long r = 0;
		long l = 0;
		if(ac-ad>0) {
			r = ac;
		}
		else {
			r = ad;
		}
		if(bc-bd>0) {
			l = bc;
		}
		else {
			l = bd;
		}
		System.out.println(Math.max((long)r, (long)l));
		
	} main {
		Scanner sc = new Scanner(System.in);
		long a = sc.nextInt();
		long b = sc.nextInt();
		long c = sc.nextInt();
		long d = sc.nextInt();
		long ac = a*c;
		long ad = a*d;
		long bc = b*c;
		long bd = b*d;
		long r = 0;
		long l = 0;
		if(ac-ad>0) {
			r = ac;
		}
		else {
			r = ad;
		}
		if(bc-bd>0) {
			l = bc;
		}
		else {
			l = bd;
		}
		System.out.println(Math.max((long)r, (long)l));
		
	} 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 long ac = a*c; ac a*c a c long ad = a*d; ad a*d a d long bc = b*c; bc b*c b c long bd = b*d; bd b*d b d long r = 0; r 0 long l = 0; l 0 if(ac-ad>0) {
			r = ac;
		}
		else {
			r = ad;
		} ac-ad>0 ac-ad ac ad 0 {
			r = ac;
		} r = ac r ac {
			r = ad;
		} r = ad r ad if(bc-bd>0) {
			l = bc;
		}
		else {
			l = bd;
		} bc-bd>0 bc-bd bc bd 0 {
			l = bc;
		} l = bc l bc {
			l = bd;
		} l = bd l bd System.out.println(Math.max((long)r, (long)l)) System.out.println System.out System System.out Math.max((long)r, (long)l) Math.max Math (long)r (long)l 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();
		long ac = a*c;
		long ad = a*d;
		long bc = b*c;
		long bd = b*d;
		long r = 0;
		long l = 0;
		if(ac-ad>0) {
			r = ac;
		}
		else {
			r = ad;
		}
		if(bc-bd>0) {
			l = bc;
		}
		else {
			l = bd;
		}
		System.out.println(Math.max((long)r, (long)l));
		
	}
} 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();
		long ac = a*c;
		long ad = a*d;
		long bc = b*c;
		long bd = b*d;
		long r = 0;
		long l = 0;
		if(ac-ad>0) {
			r = ac;
		}
		else {
			r = ad;
		}
		if(bc-bd>0) {
			l = bc;
		}
		else {
			l = bd;
		}
		System.out.println(Math.max((long)r, (long)l));
		
	}
} Main
import java.util.*;
import java.math.RoundingMode;
import java.math.BigDecimal;
 
 
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();
		long ac = a*c;
		long ad = a*d;
		long bc = b*c;
		long bd = b*d;
		long r = 0;
		long l = 0;
		if(ac-ad>0) {
			r = ac;
		}
		else {
			r = ad;
		}
		if(bc-bd>0) {
			l = bc;
		}
		else {
			l = bd;
		}
		System.out.println(Math.max((long)r, (long)l));
		
	}
}