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 sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();
		long a1 = a*c;
		long res =a1;
		long a2 = a*d;
		if(a2>res)
			res=a2;
		long a3 = b*c;
		if(a3>res)
			res=a3;
		long a4 = b*d;
		if(a4>res)
			res=a4;
		System.out.println(res);
	}
} 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 sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();
		long a1 = a*c;
		long res =a1;
		long a2 = a*d;
		if(a2>res)
			res=a2;
		long a3 = b*c;
		if(a3>res)
			res=a3;
		long a4 = b*d;
		if(a4>res)
			res=a4;
		System.out.println(res);
	}
} Main public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();
		long a1 = a*c;
		long res =a1;
		long a2 = a*d;
		if(a2>res)
			res=a2;
		long a3 = b*c;
		if(a3>res)
			res=a3;
		long a4 = b*d;
		if(a4>res)
			res=a4;
		System.out.println(res);
	} main {
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();
		long a1 = a*c;
		long res =a1;
		long a2 = a*d;
		if(a2>res)
			res=a2;
		long a3 = b*c;
		if(a3>res)
			res=a3;
		long a4 = b*d;
		if(a4>res)
			res=a4;
		System.out.println(res);
	} 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 a1 = a*c; a1 a*c a c long res =a1; res a1 long a2 = a*d; a2 a*d a d if(a2>res)
			res=a2; a2>res a2 res res=a2 res a2 long a3 = b*c; a3 b*c b c if(a3>res)
			res=a3; a3>res a3 res res=a3 res a3 long a4 = b*d; a4 b*d b d if(a4>res)
			res=a4; a4>res a4 res res=a4 res a4 System.out.println(res) System.out.println System.out System System.out res String[] args args public class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();
		long a1 = a*c;
		long res =a1;
		long a2 = a*d;
		if(a2>res)
			res=a2;
		long a3 = b*c;
		if(a3>res)
			res=a3;
		long a4 = b*d;
		if(a4>res)
			res=a4;
		System.out.println(res);
	}
} public class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();
		long a1 = a*c;
		long res =a1;
		long a2 = a*d;
		if(a2>res)
			res=a2;
		long a3 = b*c;
		if(a3>res)
			res=a3;
		long a4 = b*d;
		if(a4>res)
			res=a4;
		System.out.println(res);
	}
} Main
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 sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();
		long a1 = a*c;
		long res =a1;
		long a2 = a*d;
		if(a2>res)
			res=a2;
		long a3 = b*c;
		if(a3>res)
			res=a3;
		long a4 = b*d;
		if(a4>res)
			res=a4;
		System.out.println(res);
	}
}
