//package abc178;

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) throws Exception{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] ip = br.readLine().split(" ");
		
		long a = Long.parseLong(ip[0]);
		long b = Long.parseLong(ip[1]);
		long c = Long.parseLong(ip[2]);
		long d = Long.parseLong(ip[3]);
		
		long p = a*c;
		long q = a*d;
		long r = b*c;
		long s = b*d;
		
		System.out.println(Math.max(p, Math.max(r, Math.max(q,s))));	
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
	public static void main(String[] args) throws Exception{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] ip = br.readLine().split(" ");
		
		long a = Long.parseLong(ip[0]);
		long b = Long.parseLong(ip[1]);
		long c = Long.parseLong(ip[2]);
		long d = Long.parseLong(ip[3]);
		
		long p = a*c;
		long q = a*d;
		long r = b*c;
		long s = b*d;
		
		System.out.println(Math.max(p, Math.max(r, Math.max(q,s))));	
	}
} Main public static void main(String[] args) throws Exception{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] ip = br.readLine().split(" ");
		
		long a = Long.parseLong(ip[0]);
		long b = Long.parseLong(ip[1]);
		long c = Long.parseLong(ip[2]);
		long d = Long.parseLong(ip[3]);
		
		long p = a*c;
		long q = a*d;
		long r = b*c;
		long s = b*d;
		
		System.out.println(Math.max(p, Math.max(r, Math.max(q,s))));	
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] ip = br.readLine().split(" ");
		
		long a = Long.parseLong(ip[0]);
		long b = Long.parseLong(ip[1]);
		long c = Long.parseLong(ip[2]);
		long d = Long.parseLong(ip[3]);
		
		long p = a*c;
		long q = a*d;
		long r = b*c;
		long s = b*d;
		
		System.out.println(Math.max(p, Math.max(r, Math.max(q,s))));	
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String[] ip = br.readLine().split(" "); ip br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " long a = Long.parseLong(ip[0]); a Long.parseLong(ip[0]) Long.parseLong Long ip[0] ip 0 long b = Long.parseLong(ip[1]); b Long.parseLong(ip[1]) Long.parseLong Long ip[1] ip 1 long c = Long.parseLong(ip[2]); c Long.parseLong(ip[2]) Long.parseLong Long ip[2] ip 2 long d = Long.parseLong(ip[3]); d Long.parseLong(ip[3]) Long.parseLong Long ip[3] ip 3 long p = a*c; p a*c a c long q = a*d; q a*d a d long r = b*c; r b*c b c long s = b*d; s b*d b d System.out.println(Math.max(p, Math.max(r, Math.max(q,s)))) System.out.println System.out System System.out Math.max(p, Math.max(r, Math.max(q,s))) Math.max Math p Math.max(r, Math.max(q,s)) Math.max Math r Math.max(q,s) Math.max Math q s String[] args args public class Main {
	public static void main(String[] args) throws Exception{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] ip = br.readLine().split(" ");
		
		long a = Long.parseLong(ip[0]);
		long b = Long.parseLong(ip[1]);
		long c = Long.parseLong(ip[2]);
		long d = Long.parseLong(ip[3]);
		
		long p = a*c;
		long q = a*d;
		long r = b*c;
		long s = b*d;
		
		System.out.println(Math.max(p, Math.max(r, Math.max(q,s))));	
	}
} public class Main {
	public static void main(String[] args) throws Exception{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] ip = br.readLine().split(" ");
		
		long a = Long.parseLong(ip[0]);
		long b = Long.parseLong(ip[1]);
		long c = Long.parseLong(ip[2]);
		long d = Long.parseLong(ip[3]);
		
		long p = a*c;
		long q = a*d;
		long r = b*c;
		long s = b*d;
		
		System.out.println(Math.max(p, Math.max(r, Math.max(q,s))));	
	}
} Main
//package abc178;

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) throws Exception{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] ip = br.readLine().split(" ");
		
		long a = Long.parseLong(ip[0]);
		long b = Long.parseLong(ip[1]);
		long c = Long.parseLong(ip[2]);
		long d = Long.parseLong(ip[3]);
		
		long p = a*c;
		long q = a*d;
		long r = b*c;
		long s = b*d;
		
		System.out.println(Math.max(p, Math.max(r, Math.max(q,s))));	
	}
}
