import java.util.*;
import java.io.*;
class Main
{
	public static void main(String args[]) throws IOException
	{
		try{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String arr[]=br.readLine().split(" ");
		long ans=0;
		long h=0;long p=0;
		h=Math.max(Long.parseLong(arr[0])*Long.parseLong(arr[2]),Long.parseLong(arr[0])*Long.parseLong(arr[3]));
		p=Math.max(Long.parseLong(arr[1])*Long.parseLong(arr[2]),Long.parseLong(arr[1])*Long.parseLong(arr[3]));
		ans=Math.max(h,p);
		System.out.println(ans);
		}
	catch(Exception e){}
}} import java.util.*; util.* java import java.io.*; io.* java class Main
{
	public static void main(String args[]) throws IOException
	{
		try{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String arr[]=br.readLine().split(" ");
		long ans=0;
		long h=0;long p=0;
		h=Math.max(Long.parseLong(arr[0])*Long.parseLong(arr[2]),Long.parseLong(arr[0])*Long.parseLong(arr[3]));
		p=Math.max(Long.parseLong(arr[1])*Long.parseLong(arr[2]),Long.parseLong(arr[1])*Long.parseLong(arr[3]));
		ans=Math.max(h,p);
		System.out.println(ans);
		}
	catch(Exception e){}
}} Main public static void main(String args[]) throws IOException
	{
		try{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String arr[]=br.readLine().split(" ");
		long ans=0;
		long h=0;long p=0;
		h=Math.max(Long.parseLong(arr[0])*Long.parseLong(arr[2]),Long.parseLong(arr[0])*Long.parseLong(arr[3]));
		p=Math.max(Long.parseLong(arr[1])*Long.parseLong(arr[2]),Long.parseLong(arr[1])*Long.parseLong(arr[3]));
		ans=Math.max(h,p);
		System.out.println(ans);
		}
	catch(Exception e){}
} main {
		try{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String arr[]=br.readLine().split(" ");
		long ans=0;
		long h=0;long p=0;
		h=Math.max(Long.parseLong(arr[0])*Long.parseLong(arr[2]),Long.parseLong(arr[0])*Long.parseLong(arr[3]));
		p=Math.max(Long.parseLong(arr[1])*Long.parseLong(arr[2]),Long.parseLong(arr[1])*Long.parseLong(arr[3]));
		ans=Math.max(h,p);
		System.out.println(ans);
		}
	catch(Exception e){}
} try{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String arr[]=br.readLine().split(" ");
		long ans=0;
		long h=0;long p=0;
		h=Math.max(Long.parseLong(arr[0])*Long.parseLong(arr[2]),Long.parseLong(arr[0])*Long.parseLong(arr[3]));
		p=Math.max(Long.parseLong(arr[1])*Long.parseLong(arr[2]),Long.parseLong(arr[1])*Long.parseLong(arr[3]));
		ans=Math.max(h,p);
		System.out.println(ans);
		}
	catch(Exception e){} catch(Exception e){} Exception e {} {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String arr[]=br.readLine().split(" ");
		long ans=0;
		long h=0;long p=0;
		h=Math.max(Long.parseLong(arr[0])*Long.parseLong(arr[2]),Long.parseLong(arr[0])*Long.parseLong(arr[3]));
		p=Math.max(Long.parseLong(arr[1])*Long.parseLong(arr[2]),Long.parseLong(arr[1])*Long.parseLong(arr[3]));
		ans=Math.max(h,p);
		System.out.println(ans);
		} BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String arr[]=br.readLine().split(" "); arr br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " long ans=0; ans 0 long h=0; h 0 long p=0; p 0 h=Math.max(Long.parseLong(arr[0])*Long.parseLong(arr[2]),Long.parseLong(arr[0])*Long.parseLong(arr[3])) h Math.max(Long.parseLong(arr[0])*Long.parseLong(arr[2]),Long.parseLong(arr[0])*Long.parseLong(arr[3])) Math.max Math Long.parseLong(arr[0])*Long.parseLong(arr[2]) Long.parseLong(arr[0]) Long.parseLong Long arr[0] arr 0 Long.parseLong(arr[2]) Long.parseLong Long arr[2] arr 2 Long.parseLong(arr[0])*Long.parseLong(arr[3]) Long.parseLong(arr[0]) Long.parseLong Long arr[0] arr 0 Long.parseLong(arr[3]) Long.parseLong Long arr[3] arr 3 p=Math.max(Long.parseLong(arr[1])*Long.parseLong(arr[2]),Long.parseLong(arr[1])*Long.parseLong(arr[3])) p Math.max(Long.parseLong(arr[1])*Long.parseLong(arr[2]),Long.parseLong(arr[1])*Long.parseLong(arr[3])) Math.max Math Long.parseLong(arr[1])*Long.parseLong(arr[2]) Long.parseLong(arr[1]) Long.parseLong Long arr[1] arr 1 Long.parseLong(arr[2]) Long.parseLong Long arr[2] arr 2 Long.parseLong(arr[1])*Long.parseLong(arr[3]) Long.parseLong(arr[1]) Long.parseLong Long arr[1] arr 1 Long.parseLong(arr[3]) Long.parseLong Long arr[3] arr 3 ans=Math.max(h,p) ans Math.max(h,p) Math.max Math h p System.out.println(ans) System.out.println System.out System System.out ans String args[] args
import java.util.*;
import java.io.*;
class Main
{
	public static void main(String args[]) throws IOException
	{
		try{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String arr[]=br.readLine().split(" ");
		long ans=0;
		long h=0;long p=0;
		h=Math.max(Long.parseLong(arr[0])*Long.parseLong(arr[2]),Long.parseLong(arr[0])*Long.parseLong(arr[3]));
		p=Math.max(Long.parseLong(arr[1])*Long.parseLong(arr[2]),Long.parseLong(arr[1])*Long.parseLong(arr[3]));
		ans=Math.max(h,p);
		System.out.println(ans);
		}
	catch(Exception e){}
}}