/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner scanner = new Scanner(System.in);
		long a = scanner.nextLong();
		long b = scanner.nextLong();
		long c = scanner.nextLong();
		long d = scanner.nextLong();
		
		long max = Long.MIN_VALUE;
		
		if(a*c > max)
			max = a*c;
			
		if(a*d > max)
			max = a*d;
			
		if(b*c > max)
			max = b*c;
		
		if(b*d > max)
			max = b*d;
			
		System.out.println(max);

	}
} import java.util.*; util.* java import java.lang.*; lang.* java import java.io.*; io.* java public class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner scanner = new Scanner(System.in);
		long a = scanner.nextLong();
		long b = scanner.nextLong();
		long c = scanner.nextLong();
		long d = scanner.nextLong();
		
		long max = Long.MIN_VALUE;
		
		if(a*c > max)
			max = a*c;
			
		if(a*d > max)
			max = a*d;
			
		if(b*c > max)
			max = b*c;
		
		if(b*d > max)
			max = b*d;
			
		System.out.println(max);

	}
} Main public static void main (String[] args) throws java.lang.Exception
	{
		Scanner scanner = new Scanner(System.in);
		long a = scanner.nextLong();
		long b = scanner.nextLong();
		long c = scanner.nextLong();
		long d = scanner.nextLong();
		
		long max = Long.MIN_VALUE;
		
		if(a*c > max)
			max = a*c;
			
		if(a*d > max)
			max = a*d;
			
		if(b*c > max)
			max = b*c;
		
		if(b*d > max)
			max = b*d;
			
		System.out.println(max);

	} main {
		Scanner scanner = new Scanner(System.in);
		long a = scanner.nextLong();
		long b = scanner.nextLong();
		long c = scanner.nextLong();
		long d = scanner.nextLong();
		
		long max = Long.MIN_VALUE;
		
		if(a*c > max)
			max = a*c;
			
		if(a*d > max)
			max = a*d;
			
		if(b*c > max)
			max = b*c;
		
		if(b*d > max)
			max = b*d;
			
		System.out.println(max);

	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) long a = scanner.nextLong(); a scanner.nextLong() scanner.nextLong scanner long b = scanner.nextLong(); b scanner.nextLong() scanner.nextLong scanner long c = scanner.nextLong(); c scanner.nextLong() scanner.nextLong scanner long d = scanner.nextLong(); d scanner.nextLong() scanner.nextLong scanner long max = Long.MIN_VALUE; max Long.MIN_VALUE Long Long.MIN_VALUE if(a*c > max)
			max = a*c; a*c > max a*c a c max max = a*c max a*c a c if(a*d > max)
			max = a*d; a*d > max a*d a d max max = a*d max a*d a d if(b*c > max)
			max = b*c; b*c > max b*c b c max max = b*c max b*c b c if(b*d > max)
			max = b*d; b*d > max b*d b d max max = b*d max b*d b d 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) throws java.lang.Exception
	{
		Scanner scanner = new Scanner(System.in);
		long a = scanner.nextLong();
		long b = scanner.nextLong();
		long c = scanner.nextLong();
		long d = scanner.nextLong();
		
		long max = Long.MIN_VALUE;
		
		if(a*c > max)
			max = a*c;
			
		if(a*d > max)
			max = a*d;
			
		if(b*c > max)
			max = b*c;
		
		if(b*d > max)
			max = b*d;
			
		System.out.println(max);

	}
} public class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner scanner = new Scanner(System.in);
		long a = scanner.nextLong();
		long b = scanner.nextLong();
		long c = scanner.nextLong();
		long d = scanner.nextLong();
		
		long max = Long.MIN_VALUE;
		
		if(a*c > max)
			max = a*c;
			
		if(a*d > max)
			max = a*d;
			
		if(b*c > max)
			max = b*c;
		
		if(b*d > max)
			max = b*d;
			
		System.out.println(max);

	}
} Main
/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner scanner = new Scanner(System.in);
		long a = scanner.nextLong();
		long b = scanner.nextLong();
		long c = scanner.nextLong();
		long d = scanner.nextLong();
		
		long max = Long.MIN_VALUE;
		
		if(a*c > max)
			max = a*c;
			
		if(a*d > max)
			max = a*d;
			
		if(b*c > max)
			max = b*c;
		
		if(b*d > max)
			max = b*d;
			
		System.out.println(max);

	}
}