import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Random;
import java.util.StringTokenizer;

public class Main {

	static long mod=(long)1e9+7;
	
	public static void main(String[] args) {
		FastScanner fs=new FastScanner();
		int a = fs.nextInt();
		int b = fs.nextInt();
		int c = fs.nextInt();
		int d = fs.nextInt();
		
		System.out.println(Math.max(a*1L*c, Math.max( Math.max(a*1L*d, b*1L*c), b*1L*d)));
	}
	
	static long mul(long a, long b) {
		return a*b%mod;
	}
	
	static class Node {
		ArrayList<Node> adj=new ArrayList<>();
		int subtreeSize;
		
		public void dfs(Node par) {
			this.subtreeSize=1;
			for (Node nn:adj) if (nn!=par) {
				nn.dfs(this);
				this.subtreeSize+=nn.subtreeSize;
			}
		}
	}

	static final Random random=new Random();
	
	static void ruffleSort(int[] a) {
		int n=a.length;//shuffle, then sort 
		for (int i=0; i<n; i++) {
			int oi=random.nextInt(n), temp=a[oi];
			a[oi]=a[i]; a[i]=temp;
		}
		Arrays.sort(a);
	}
	
	static void ruffleSort(long[] a) {
		int n=a.length;//shuffle, then sort 
		for (int i=0; i<n; i++) {
			int oi=random.nextInt(n);
			long temp=a[oi];
			a[oi]=a[i]; a[i]=temp;
		}
		Arrays.sort(a);
	}
	
	static class FastScanner {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer("");
		String next() {
			while (!st.hasMoreTokens())
				try {
					st=new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		}
		
		int nextInt() {
			return Integer.parseInt(next());
		}
		int[] readArray(int n) {
			int[] a=new int[n];
			for (int i=0; i<n; i++) a[i]=nextInt();
			return a;
		}
		long nextLong() {
			return Long.parseLong(next());
		}
	}

	
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.Random; Random java.util import java.util.StringTokenizer; StringTokenizer java.util public class Main {

	static long mod=(long)1e9+7;
	
	public static void main(String[] args) {
		FastScanner fs=new FastScanner();
		int a = fs.nextInt();
		int b = fs.nextInt();
		int c = fs.nextInt();
		int d = fs.nextInt();
		
		System.out.println(Math.max(a*1L*c, Math.max( Math.max(a*1L*d, b*1L*c), b*1L*d)));
	}
	
	static long mul(long a, long b) {
		return a*b%mod;
	}
	
	static class Node {
		ArrayList<Node> adj=new ArrayList<>();
		int subtreeSize;
		
		public void dfs(Node par) {
			this.subtreeSize=1;
			for (Node nn:adj) if (nn!=par) {
				nn.dfs(this);
				this.subtreeSize+=nn.subtreeSize;
			}
		}
	}

	static final Random random=new Random();
	
	static void ruffleSort(int[] a) {
		int n=a.length;//shuffle, then sort 
		for (int i=0; i<n; i++) {
			int oi=random.nextInt(n), temp=a[oi];
			a[oi]=a[i]; a[i]=temp;
		}
		Arrays.sort(a);
	}
	
	static void ruffleSort(long[] a) {
		int n=a.length;//shuffle, then sort 
		for (int i=0; i<n; i++) {
			int oi=random.nextInt(n);
			long temp=a[oi];
			a[oi]=a[i]; a[i]=temp;
		}
		Arrays.sort(a);
	}
	
	static class FastScanner {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer("");
		String next() {
			while (!st.hasMoreTokens())
				try {
					st=new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		}
		
		int nextInt() {
			return Integer.parseInt(next());
		}
		int[] readArray(int n) {
			int[] a=new int[n];
			for (int i=0; i<n; i++) a[i]=nextInt();
			return a;
		}
		long nextLong() {
			return Long.parseLong(next());
		}
	}

	
} Main static long mod=(long)1e9+7; mod (long)1e9+7 (long)1e9 7 static final Random random=new Random(); random new Random() public static void main(String[] args) {
		FastScanner fs=new FastScanner();
		int a = fs.nextInt();
		int b = fs.nextInt();
		int c = fs.nextInt();
		int d = fs.nextInt();
		
		System.out.println(Math.max(a*1L*c, Math.max( Math.max(a*1L*d, b*1L*c), b*1L*d)));
	} main {
		FastScanner fs=new FastScanner();
		int a = fs.nextInt();
		int b = fs.nextInt();
		int c = fs.nextInt();
		int d = fs.nextInt();
		
		System.out.println(Math.max(a*1L*c, Math.max( Math.max(a*1L*d, b*1L*c), b*1L*d)));
	} FastScanner fs=new FastScanner(); fs new FastScanner() int a = fs.nextInt(); a fs.nextInt() fs.nextInt fs int b = fs.nextInt(); b fs.nextInt() fs.nextInt fs int c = fs.nextInt(); c fs.nextInt() fs.nextInt fs int d = fs.nextInt(); d fs.nextInt() fs.nextInt fs System.out.println(Math.max(a*1L*c, Math.max( Math.max(a*1L*d, b*1L*c), b*1L*d))) System.out.println System.out System System.out Math.max(a*1L*c, Math.max( Math.max(a*1L*d, b*1L*c), b*1L*d)) Math.max Math a*1L*c a*1L*c a 1L c Math.max( Math.max(a*1L*d, b*1L*c), b*1L*d) Math.max Math Math.max(a*1L*d, b*1L*c) Math.max Math a*1L*d a*1L*d a 1L d b*1L*c b*1L*c b 1L c b*1L*d b*1L*d b 1L d String[] args args static long mul(long a, long b) {
		return a*b%mod;
	} mul {
		return a*b%mod;
	} return a*b%mod; a*b%mod a*b a b mod long a a long b b static void ruffleSort(int[] a) {
		int n=a.length;//shuffle, then sort 
		for (int i=0; i<n; i++) {
			int oi=random.nextInt(n), temp=a[oi];
			a[oi]=a[i]; a[i]=temp;
		}
		Arrays.sort(a);
	} ruffleSort {
		int n=a.length;//shuffle, then sort 
		for (int i=0; i<n; i++) {
			int oi=random.nextInt(n), temp=a[oi];
			a[oi]=a[i]; a[i]=temp;
		}
		Arrays.sort(a);
	} int n=a.length; n a.length a a.length for (int i=0; i<n; i++) {
			int oi=random.nextInt(n), temp=a[oi];
			a[oi]=a[i]; a[i]=temp;
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			int oi=random.nextInt(n), temp=a[oi];
			a[oi]=a[i]; a[i]=temp;
		} {
			int oi=random.nextInt(n), temp=a[oi];
			a[oi]=a[i]; a[i]=temp;
		} int oi=random.nextInt(n) oi random.nextInt(n) random.nextInt random n temp=a[oi]; temp a[oi] a oi a[oi]=a[i] a[oi] a oi a[i] a i a[i]=temp a[i] a i temp Arrays.sort(a) Arrays.sort Arrays a int[] a a static void ruffleSort(long[] a) {
		int n=a.length;//shuffle, then sort 
		for (int i=0; i<n; i++) {
			int oi=random.nextInt(n);
			long temp=a[oi];
			a[oi]=a[i]; a[i]=temp;
		}
		Arrays.sort(a);
	} ruffleSort {
		int n=a.length;//shuffle, then sort 
		for (int i=0; i<n; i++) {
			int oi=random.nextInt(n);
			long temp=a[oi];
			a[oi]=a[i]; a[i]=temp;
		}
		Arrays.sort(a);
	} int n=a.length; n a.length a a.length for (int i=0; i<n; i++) {
			int oi=random.nextInt(n);
			long temp=a[oi];
			a[oi]=a[i]; a[i]=temp;
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			int oi=random.nextInt(n);
			long temp=a[oi];
			a[oi]=a[i]; a[i]=temp;
		} {
			int oi=random.nextInt(n);
			long temp=a[oi];
			a[oi]=a[i]; a[i]=temp;
		} int oi=random.nextInt(n); oi random.nextInt(n) random.nextInt random n long temp=a[oi]; temp a[oi] a oi a[oi]=a[i] a[oi] a oi a[i] a i a[i]=temp a[i] a i temp Arrays.sort(a) Arrays.sort Arrays a long[] a a static class Node {
		ArrayList<Node> adj=new ArrayList<>();
		int subtreeSize;
		
		public void dfs(Node par) {
			this.subtreeSize=1;
			for (Node nn:adj) if (nn!=par) {
				nn.dfs(this);
				this.subtreeSize+=nn.subtreeSize;
			}
		}
	} Node ArrayList<Node> adj=new ArrayList<>(); adj new ArrayList<>() int subtreeSize; subtreeSize public void dfs(Node par) {
			this.subtreeSize=1;
			for (Node nn:adj) if (nn!=par) {
				nn.dfs(this);
				this.subtreeSize+=nn.subtreeSize;
			}
		} dfs {
			this.subtreeSize=1;
			for (Node nn:adj) if (nn!=par) {
				nn.dfs(this);
				this.subtreeSize+=nn.subtreeSize;
			}
		} this.subtreeSize=1 this.subtreeSize this this.subtreeSize 1 for (Node nn:adj) if (nn!=par) {
				nn.dfs(this);
				this.subtreeSize+=nn.subtreeSize;
			} Node nn adj if (nn!=par) {
				nn.dfs(this);
				this.subtreeSize+=nn.subtreeSize;
			} if (nn!=par) {
				nn.dfs(this);
				this.subtreeSize+=nn.subtreeSize;
			} nn!=par nn par {
				nn.dfs(this);
				this.subtreeSize+=nn.subtreeSize;
			} nn.dfs(this) nn.dfs nn this this.subtreeSize+=nn.subtreeSize this.subtreeSize this this.subtreeSize nn.subtreeSize nn nn.subtreeSize Node par par static class FastScanner {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer("");
		String next() {
			while (!st.hasMoreTokens())
				try {
					st=new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		}
		
		int nextInt() {
			return Integer.parseInt(next());
		}
		int[] readArray(int n) {
			int[] a=new int[n];
			for (int i=0; i<n; i++) a[i]=nextInt();
			return a;
		}
		long nextLong() {
			return Long.parseLong(next());
		}
	} FastScanner BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringTokenizer st=new StringTokenizer(""); st new StringTokenizer("") String next() {
			while (!st.hasMoreTokens())
				try {
					st=new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		} next {
			while (!st.hasMoreTokens())
				try {
					st=new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		} while (!st.hasMoreTokens())
				try {
					st=new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				} !st.hasMoreTokens() st.hasMoreTokens() st.hasMoreTokens st try {
					st=new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				} catch (IOException e) {
					e.printStackTrace();
				} IOException e {
					e.printStackTrace();
				} e.printStackTrace() e.printStackTrace e {
					st=new StringTokenizer(br.readLine());
				} st=new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return st.nextToken(); st.nextToken() st.nextToken st int nextInt() {
			return Integer.parseInt(next());
		} nextInt {
			return Integer.parseInt(next());
		} return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next int[] readArray(int n) {
			int[] a=new int[n];
			for (int i=0; i<n; i++) a[i]=nextInt();
			return a;
		} readArray {
			int[] a=new int[n];
			for (int i=0; i<n; i++) a[i]=nextInt();
			return a;
		} int[] a=new int[n]; a new int[n] n for (int i=0; i<n; i++) a[i]=nextInt(); int i=0; int i=0; i 0 i<n i n i++ i++ i a[i]=nextInt(); a[i]=nextInt() a[i] a i nextInt() nextInt return a; a int n n long nextLong() {
			return Long.parseLong(next());
		} nextLong {
			return Long.parseLong(next());
		} return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next public class Main {

	static long mod=(long)1e9+7;
	
	public static void main(String[] args) {
		FastScanner fs=new FastScanner();
		int a = fs.nextInt();
		int b = fs.nextInt();
		int c = fs.nextInt();
		int d = fs.nextInt();
		
		System.out.println(Math.max(a*1L*c, Math.max( Math.max(a*1L*d, b*1L*c), b*1L*d)));
	}
	
	static long mul(long a, long b) {
		return a*b%mod;
	}
	
	static class Node {
		ArrayList<Node> adj=new ArrayList<>();
		int subtreeSize;
		
		public void dfs(Node par) {
			this.subtreeSize=1;
			for (Node nn:adj) if (nn!=par) {
				nn.dfs(this);
				this.subtreeSize+=nn.subtreeSize;
			}
		}
	}

	static final Random random=new Random();
	
	static void ruffleSort(int[] a) {
		int n=a.length;//shuffle, then sort 
		for (int i=0; i<n; i++) {
			int oi=random.nextInt(n), temp=a[oi];
			a[oi]=a[i]; a[i]=temp;
		}
		Arrays.sort(a);
	}
	
	static void ruffleSort(long[] a) {
		int n=a.length;//shuffle, then sort 
		for (int i=0; i<n; i++) {
			int oi=random.nextInt(n);
			long temp=a[oi];
			a[oi]=a[i]; a[i]=temp;
		}
		Arrays.sort(a);
	}
	
	static class FastScanner {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer("");
		String next() {
			while (!st.hasMoreTokens())
				try {
					st=new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		}
		
		int nextInt() {
			return Integer.parseInt(next());
		}
		int[] readArray(int n) {
			int[] a=new int[n];
			for (int i=0; i<n; i++) a[i]=nextInt();
			return a;
		}
		long nextLong() {
			return Long.parseLong(next());
		}
	}

	
} public class Main {

	static long mod=(long)1e9+7;
	
	public static void main(String[] args) {
		FastScanner fs=new FastScanner();
		int a = fs.nextInt();
		int b = fs.nextInt();
		int c = fs.nextInt();
		int d = fs.nextInt();
		
		System.out.println(Math.max(a*1L*c, Math.max( Math.max(a*1L*d, b*1L*c), b*1L*d)));
	}
	
	static long mul(long a, long b) {
		return a*b%mod;
	}
	
	static class Node {
		ArrayList<Node> adj=new ArrayList<>();
		int subtreeSize;
		
		public void dfs(Node par) {
			this.subtreeSize=1;
			for (Node nn:adj) if (nn!=par) {
				nn.dfs(this);
				this.subtreeSize+=nn.subtreeSize;
			}
		}
	}

	static final Random random=new Random();
	
	static void ruffleSort(int[] a) {
		int n=a.length;//shuffle, then sort 
		for (int i=0; i<n; i++) {
			int oi=random.nextInt(n), temp=a[oi];
			a[oi]=a[i]; a[i]=temp;
		}
		Arrays.sort(a);
	}
	
	static void ruffleSort(long[] a) {
		int n=a.length;//shuffle, then sort 
		for (int i=0; i<n; i++) {
			int oi=random.nextInt(n);
			long temp=a[oi];
			a[oi]=a[i]; a[i]=temp;
		}
		Arrays.sort(a);
	}
	
	static class FastScanner {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer("");
		String next() {
			while (!st.hasMoreTokens())
				try {
					st=new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		}
		
		int nextInt() {
			return Integer.parseInt(next());
		}
		int[] readArray(int n) {
			int[] a=new int[n];
			for (int i=0; i<n; i++) a[i]=nextInt();
			return a;
		}
		long nextLong() {
			return Long.parseLong(next());
		}
	}

	
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Random;
import java.util.StringTokenizer;

public class Main {

	static long mod=(long)1e9+7;
	
	public static void main(String[] args) {
		FastScanner fs=new FastScanner();
		int a = fs.nextInt();
		int b = fs.nextInt();
		int c = fs.nextInt();
		int d = fs.nextInt();
		
		System.out.println(Math.max(a*1L*c, Math.max( Math.max(a*1L*d, b*1L*c), b*1L*d)));
	}
	
	static long mul(long a, long b) {
		return a*b%mod;
	}
	
	static class Node {
		ArrayList<Node> adj=new ArrayList<>();
		int subtreeSize;
		
		public void dfs(Node par) {
			this.subtreeSize=1;
			for (Node nn:adj) if (nn!=par) {
				nn.dfs(this);
				this.subtreeSize+=nn.subtreeSize;
			}
		}
	}

	static final Random random=new Random();
	
	static void ruffleSort(int[] a) {
		int n=a.length;//shuffle, then sort 
		for (int i=0; i<n; i++) {
			int oi=random.nextInt(n), temp=a[oi];
			a[oi]=a[i]; a[i]=temp;
		}
		Arrays.sort(a);
	}
	
	static void ruffleSort(long[] a) {
		int n=a.length;//shuffle, then sort 
		for (int i=0; i<n; i++) {
			int oi=random.nextInt(n);
			long temp=a[oi];
			a[oi]=a[i]; a[i]=temp;
		}
		Arrays.sort(a);
	}
	
	static class FastScanner {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer("");
		String next() {
			while (!st.hasMoreTokens())
				try {
					st=new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		}
		
		int nextInt() {
			return Integer.parseInt(next());
		}
		int[] readArray(int n) {
			int[] a=new int[n];
			for (int i=0; i<n; i++) a[i]=nextInt();
			return a;
		}
		long nextLong() {
			return Long.parseLong(next());
		}
	}

	
}
