import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();
		long []arr = {a,b,c,d};
		long total = 0;
		long max = Long.MIN_VALUE;
		for(int i = 0 ; i < 2; i++)
		{
			for(int j = 2; j<4; j++)
			{
					total = arr[i] * arr[j];
				
				if(total > max)
				{
					max = total;
					
				}
				
			}
		}
		System.out.println(max);
	}

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

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();
		long []arr = {a,b,c,d};
		long total = 0;
		long max = Long.MIN_VALUE;
		for(int i = 0 ; i < 2; i++)
		{
			for(int j = 2; j<4; j++)
			{
					total = arr[i] * arr[j];
				
				if(total > max)
				{
					max = total;
					
				}
				
			}
		}
		System.out.println(max);
	}

} Main public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();
		long []arr = {a,b,c,d};
		long total = 0;
		long max = Long.MIN_VALUE;
		for(int i = 0 ; i < 2; i++)
		{
			for(int j = 2; j<4; j++)
			{
					total = arr[i] * arr[j];
				
				if(total > max)
				{
					max = total;
					
				}
				
			}
		}
		System.out.println(max);
	} main {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();
		long []arr = {a,b,c,d};
		long total = 0;
		long max = Long.MIN_VALUE;
		for(int i = 0 ; i < 2; i++)
		{
			for(int j = 2; j<4; j++)
			{
					total = arr[i] * arr[j];
				
				if(total > max)
				{
					max = total;
					
				}
				
			}
		}
		System.out.println(max);
	} 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 []arr = {a,b,c,d}; arr {a,b,c,d} a b c d long total = 0; total 0 long max = Long.MIN_VALUE; max Long.MIN_VALUE Long Long.MIN_VALUE for(int i = 0 ; i < 2; i++)
		{
			for(int j = 2; j<4; j++)
			{
					total = arr[i] * arr[j];
				
				if(total > max)
				{
					max = total;
					
				}
				
			}
		} int i = 0 ; int i = 0 ; i 0 i < 2 i 2 i++ i++ i {
			for(int j = 2; j<4; j++)
			{
					total = arr[i] * arr[j];
				
				if(total > max)
				{
					max = total;
					
				}
				
			}
		} {
			for(int j = 2; j<4; j++)
			{
					total = arr[i] * arr[j];
				
				if(total > max)
				{
					max = total;
					
				}
				
			}
		} for(int j = 2; j<4; j++)
			{
					total = arr[i] * arr[j];
				
				if(total > max)
				{
					max = total;
					
				}
				
			} int j = 2; int j = 2; j 2 j<4 j 4 j++ j++ j {
					total = arr[i] * arr[j];
				
				if(total > max)
				{
					max = total;
					
				}
				
			} {
					total = arr[i] * arr[j];
				
				if(total > max)
				{
					max = total;
					
				}
				
			} total = arr[i] * arr[j] total arr[i] * arr[j] arr[i] arr i arr[j] arr j if(total > max)
				{
					max = total;
					
				} total > max total max {
					max = total;
					
				} max = total max total System.out.println(max) System.out.println System.out System System.out max String[] args args public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();
		long []arr = {a,b,c,d};
		long total = 0;
		long max = Long.MIN_VALUE;
		for(int i = 0 ; i < 2; i++)
		{
			for(int j = 2; j<4; j++)
			{
					total = arr[i] * arr[j];
				
				if(total > max)
				{
					max = total;
					
				}
				
			}
		}
		System.out.println(max);
	}

} public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();
		long []arr = {a,b,c,d};
		long total = 0;
		long max = Long.MIN_VALUE;
		for(int i = 0 ; i < 2; i++)
		{
			for(int j = 2; j<4; j++)
			{
					total = arr[i] * arr[j];
				
				if(total > max)
				{
					max = total;
					
				}
				
			}
		}
		System.out.println(max);
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();
		long []arr = {a,b,c,d};
		long total = 0;
		long max = Long.MIN_VALUE;
		for(int i = 0 ; i < 2; i++)
		{
			for(int j = 2; j<4; j++)
			{
					total = arr[i] * arr[j];
				
				if(total > max)
				{
					max = total;
					
				}
				
			}
		}
		System.out.println(max);
	}

}