import java.util.*;
import java.io.*;
import java.util.Arrays;
public class Main {

	public static void main (String [] args) throws IOException

	{
		Scanner s=new Scanner(System.in);
		PrintWriter pw=new PrintWriter(System.out);

		int a=s.nextInt(),b=s.nextInt(),c=s.nextInt(),d=s.nextInt();
		long max=Long.MIN_VALUE;
		int x=Math.max(a,b);
		long y=Math.max(c,d);
		max=Math.max(max,x*y);

		x=Math.min(a,b);
		y=Math.min(c,d);
		max=Math.max(max,x*y);

		x=Math.min(a,b);
		y=Math.max(c,d);
		max=Math.max(max,x*y);


		x=Math.max(a,b);
		y=Math.min(c,d);
		max=Math.max(max,x*y);
		pw.println(max);


		pw.flush();

}


















	public static void shuffle(int[] a)
	{
		int n = a.length;
		for(int i = 0; i < n; i++)
		{
			int r = i + (int)(Math.random() * (n - i));
			int tmp = a[i];
			a[i] = a[r];
			a[r] = tmp;
		}
	}

	/*

	 try {
		    Thread.sleep(2000);
		} catch(InterruptedException ex) {
		    Thread.currentThread().interrupt();
		}

	 */



	static class Scanner
{
	StringTokenizer st;
	BufferedReader br;

	public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

	public String next() throws IOException
	{
		while (st == null || !st.hasMoreTokens())
			st = new StringTokenizer(br.readLine());
		return st.nextToken();
	}

	public int nextInt() throws IOException {return Integer.parseInt(next());}

	public long nextLong() throws IOException {return Long.parseLong(next());}

	public String nextLine() throws IOException {return br.readLine();}

	public double nextDouble() throws IOException
	{
		String x = next();
		StringBuilder sb = new StringBuilder("0");
		double res = 0, f = 1;
		boolean dec = false, neg = false;
		int start = 0;
		if(x.charAt(0) == '-')
		{
			neg = true;
			start++;
		}
		for(int i = start; i < x.length(); i++)
			if(x.charAt(i) == '.')
			{
				res = Long.parseLong(sb.toString());
				sb = new StringBuilder("0");
				dec = true;
			}
			else
			{
				sb.append(x.charAt(i));
				if(dec)
					f *= 10;
			}
		res += Long.parseLong(sb.toString()) / f;
		return res * (neg?-1:1);
	}

	public boolean ready() throws IOException {return br.ready();}


}
} import java.util.*; util.* java import java.io.*; io.* java import java.util.Arrays; Arrays java.util public class Main {

	public static void main (String [] args) throws IOException

	{
		Scanner s=new Scanner(System.in);
		PrintWriter pw=new PrintWriter(System.out);

		int a=s.nextInt(),b=s.nextInt(),c=s.nextInt(),d=s.nextInt();
		long max=Long.MIN_VALUE;
		int x=Math.max(a,b);
		long y=Math.max(c,d);
		max=Math.max(max,x*y);

		x=Math.min(a,b);
		y=Math.min(c,d);
		max=Math.max(max,x*y);

		x=Math.min(a,b);
		y=Math.max(c,d);
		max=Math.max(max,x*y);


		x=Math.max(a,b);
		y=Math.min(c,d);
		max=Math.max(max,x*y);
		pw.println(max);


		pw.flush();

}


















	public static void shuffle(int[] a)
	{
		int n = a.length;
		for(int i = 0; i < n; i++)
		{
			int r = i + (int)(Math.random() * (n - i));
			int tmp = a[i];
			a[i] = a[r];
			a[r] = tmp;
		}
	}

	/*

	 try {
		    Thread.sleep(2000);
		} catch(InterruptedException ex) {
		    Thread.currentThread().interrupt();
		}

	 */



	static class Scanner
{
	StringTokenizer st;
	BufferedReader br;

	public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

	public String next() throws IOException
	{
		while (st == null || !st.hasMoreTokens())
			st = new StringTokenizer(br.readLine());
		return st.nextToken();
	}

	public int nextInt() throws IOException {return Integer.parseInt(next());}

	public long nextLong() throws IOException {return Long.parseLong(next());}

	public String nextLine() throws IOException {return br.readLine();}

	public double nextDouble() throws IOException
	{
		String x = next();
		StringBuilder sb = new StringBuilder("0");
		double res = 0, f = 1;
		boolean dec = false, neg = false;
		int start = 0;
		if(x.charAt(0) == '-')
		{
			neg = true;
			start++;
		}
		for(int i = start; i < x.length(); i++)
			if(x.charAt(i) == '.')
			{
				res = Long.parseLong(sb.toString());
				sb = new StringBuilder("0");
				dec = true;
			}
			else
			{
				sb.append(x.charAt(i));
				if(dec)
					f *= 10;
			}
		res += Long.parseLong(sb.toString()) / f;
		return res * (neg?-1:1);
	}

	public boolean ready() throws IOException {return br.ready();}


}
} Main public static void main (String [] args) throws IOException

	{
		Scanner s=new Scanner(System.in);
		PrintWriter pw=new PrintWriter(System.out);

		int a=s.nextInt(),b=s.nextInt(),c=s.nextInt(),d=s.nextInt();
		long max=Long.MIN_VALUE;
		int x=Math.max(a,b);
		long y=Math.max(c,d);
		max=Math.max(max,x*y);

		x=Math.min(a,b);
		y=Math.min(c,d);
		max=Math.max(max,x*y);

		x=Math.min(a,b);
		y=Math.max(c,d);
		max=Math.max(max,x*y);


		x=Math.max(a,b);
		y=Math.min(c,d);
		max=Math.max(max,x*y);
		pw.println(max);


		pw.flush();

} main {
		Scanner s=new Scanner(System.in);
		PrintWriter pw=new PrintWriter(System.out);

		int a=s.nextInt(),b=s.nextInt(),c=s.nextInt(),d=s.nextInt();
		long max=Long.MIN_VALUE;
		int x=Math.max(a,b);
		long y=Math.max(c,d);
		max=Math.max(max,x*y);

		x=Math.min(a,b);
		y=Math.min(c,d);
		max=Math.max(max,x*y);

		x=Math.min(a,b);
		y=Math.max(c,d);
		max=Math.max(max,x*y);


		x=Math.max(a,b);
		y=Math.min(c,d);
		max=Math.max(max,x*y);
		pw.println(max);


		pw.flush();

} Scanner s=new Scanner(System.in); s new Scanner(System.in) PrintWriter pw=new PrintWriter(System.out); pw new PrintWriter(System.out) int a=s.nextInt() a s.nextInt() s.nextInt s b=s.nextInt() b s.nextInt() s.nextInt s c=s.nextInt() c s.nextInt() s.nextInt s d=s.nextInt(); d s.nextInt() s.nextInt s long max=Long.MIN_VALUE; max Long.MIN_VALUE Long Long.MIN_VALUE int x=Math.max(a,b); x Math.max(a,b) Math.max Math a b long y=Math.max(c,d); y Math.max(c,d) Math.max Math c d max=Math.max(max,x*y) max Math.max(max,x*y) Math.max Math max x*y x y x=Math.min(a,b) x Math.min(a,b) Math.min Math a b y=Math.min(c,d) y Math.min(c,d) Math.min Math c d max=Math.max(max,x*y) max Math.max(max,x*y) Math.max Math max x*y x y x=Math.min(a,b) x Math.min(a,b) Math.min Math a b y=Math.max(c,d) y Math.max(c,d) Math.max Math c d max=Math.max(max,x*y) max Math.max(max,x*y) Math.max Math max x*y x y x=Math.max(a,b) x Math.max(a,b) Math.max Math a b y=Math.min(c,d) y Math.min(c,d) Math.min Math c d max=Math.max(max,x*y) max Math.max(max,x*y) Math.max Math max x*y x y pw.println(max) pw.println pw max pw.flush() pw.flush pw String [] args args public static void shuffle(int[] a)
	{
		int n = a.length;
		for(int i = 0; i < n; i++)
		{
			int r = i + (int)(Math.random() * (n - i));
			int tmp = a[i];
			a[i] = a[r];
			a[r] = tmp;
		}
	} shuffle {
		int n = a.length;
		for(int i = 0; i < n; i++)
		{
			int r = i + (int)(Math.random() * (n - i));
			int tmp = a[i];
			a[i] = a[r];
			a[r] = tmp;
		}
	} int n = a.length; n a.length a a.length for(int i = 0; i < n; i++)
		{
			int r = i + (int)(Math.random() * (n - i));
			int tmp = a[i];
			a[i] = a[r];
			a[r] = tmp;
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			int r = i + (int)(Math.random() * (n - i));
			int tmp = a[i];
			a[i] = a[r];
			a[r] = tmp;
		} {
			int r = i + (int)(Math.random() * (n - i));
			int tmp = a[i];
			a[i] = a[r];
			a[r] = tmp;
		} int r = i + (int)(Math.random() * (n - i)); r i + (int)(Math.random() * (n - i)) i (int)(Math.random() * (n - i)) Math.random() Math.random Math (n - i) n i int tmp = a[i]; tmp a[i] a i a[i] = a[r] a[i] a i a[r] a r a[r] = tmp a[r] a r tmp int[] a a static class Scanner
{
	StringTokenizer st;
	BufferedReader br;

	public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

	public String next() throws IOException
	{
		while (st == null || !st.hasMoreTokens())
			st = new StringTokenizer(br.readLine());
		return st.nextToken();
	}

	public int nextInt() throws IOException {return Integer.parseInt(next());}

	public long nextLong() throws IOException {return Long.parseLong(next());}

	public String nextLine() throws IOException {return br.readLine();}

	public double nextDouble() throws IOException
	{
		String x = next();
		StringBuilder sb = new StringBuilder("0");
		double res = 0, f = 1;
		boolean dec = false, neg = false;
		int start = 0;
		if(x.charAt(0) == '-')
		{
			neg = true;
			start++;
		}
		for(int i = start; i < x.length(); i++)
			if(x.charAt(i) == '.')
			{
				res = Long.parseLong(sb.toString());
				sb = new StringBuilder("0");
				dec = true;
			}
			else
			{
				sb.append(x.charAt(i));
				if(dec)
					f *= 10;
			}
		res += Long.parseLong(sb.toString()) / f;
		return res * (neg?-1:1);
	}

	public boolean ready() throws IOException {return br.ready();}


} Scanner StringTokenizer st; st BufferedReader br; br public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));} Scanner {	br = new BufferedReader(new InputStreamReader(s));} br = new BufferedReader(new InputStreamReader(s)) br new BufferedReader(new InputStreamReader(s)) InputStream s s public String next() throws IOException
	{
		while (st == null || !st.hasMoreTokens())
			st = new StringTokenizer(br.readLine());
		return st.nextToken();
	} next {
		while (st == null || !st.hasMoreTokens())
			st = new StringTokenizer(br.readLine());
		return st.nextToken();
	} while (st == null || !st.hasMoreTokens())
			st = new StringTokenizer(br.readLine()); st == null || !st.hasMoreTokens() st == null st null !st.hasMoreTokens() st.hasMoreTokens() st.hasMoreTokens st st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return st.nextToken(); st.nextToken() st.nextToken st public int nextInt() throws IOException {return Integer.parseInt(next());} nextInt {return Integer.parseInt(next());} return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next public long nextLong() throws IOException {return Long.parseLong(next());} nextLong {return Long.parseLong(next());} return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next public String nextLine() throws IOException {return br.readLine();} nextLine {return br.readLine();} return br.readLine(); br.readLine() br.readLine br public double nextDouble() throws IOException
	{
		String x = next();
		StringBuilder sb = new StringBuilder("0");
		double res = 0, f = 1;
		boolean dec = false, neg = false;
		int start = 0;
		if(x.charAt(0) == '-')
		{
			neg = true;
			start++;
		}
		for(int i = start; i < x.length(); i++)
			if(x.charAt(i) == '.')
			{
				res = Long.parseLong(sb.toString());
				sb = new StringBuilder("0");
				dec = true;
			}
			else
			{
				sb.append(x.charAt(i));
				if(dec)
					f *= 10;
			}
		res += Long.parseLong(sb.toString()) / f;
		return res * (neg?-1:1);
	} nextDouble {
		String x = next();
		StringBuilder sb = new StringBuilder("0");
		double res = 0, f = 1;
		boolean dec = false, neg = false;
		int start = 0;
		if(x.charAt(0) == '-')
		{
			neg = true;
			start++;
		}
		for(int i = start; i < x.length(); i++)
			if(x.charAt(i) == '.')
			{
				res = Long.parseLong(sb.toString());
				sb = new StringBuilder("0");
				dec = true;
			}
			else
			{
				sb.append(x.charAt(i));
				if(dec)
					f *= 10;
			}
		res += Long.parseLong(sb.toString()) / f;
		return res * (neg?-1:1);
	} String x = next(); x next() next StringBuilder sb = new StringBuilder("0"); sb new StringBuilder("0") double res = 0 res 0 f = 1; f 1 boolean dec = false dec false neg = false; neg false int start = 0; start 0 if(x.charAt(0) == '-')
		{
			neg = true;
			start++;
		} x.charAt(0) == '-' x.charAt(0) x.charAt x 0 '-' {
			neg = true;
			start++;
		} neg = true neg true start++ start for(int i = start; i < x.length(); i++)
			if(x.charAt(i) == '.')
			{
				res = Long.parseLong(sb.toString());
				sb = new StringBuilder("0");
				dec = true;
			}
			else
			{
				sb.append(x.charAt(i));
				if(dec)
					f *= 10;
			} int i = start; int i = start; i start i < x.length() i x.length() x.length x i++ i++ i if(x.charAt(i) == '.')
			{
				res = Long.parseLong(sb.toString());
				sb = new StringBuilder("0");
				dec = true;
			}
			else
			{
				sb.append(x.charAt(i));
				if(dec)
					f *= 10;
			} if(x.charAt(i) == '.')
			{
				res = Long.parseLong(sb.toString());
				sb = new StringBuilder("0");
				dec = true;
			}
			else
			{
				sb.append(x.charAt(i));
				if(dec)
					f *= 10;
			} x.charAt(i) == '.' x.charAt(i) x.charAt x i '.' {
				res = Long.parseLong(sb.toString());
				sb = new StringBuilder("0");
				dec = true;
			} res = Long.parseLong(sb.toString()) res Long.parseLong(sb.toString()) Long.parseLong Long sb.toString() sb.toString sb sb = new StringBuilder("0") sb new StringBuilder("0") dec = true dec true {
				sb.append(x.charAt(i));
				if(dec)
					f *= 10;
			} sb.append(x.charAt(i)) sb.append sb x.charAt(i) x.charAt x i if(dec)
					f *= 10; dec f *= 10 f 10 res += Long.parseLong(sb.toString()) / f res Long.parseLong(sb.toString()) / f Long.parseLong(sb.toString()) Long.parseLong Long sb.toString() sb.toString sb f return res * (neg?-1:1); res * (neg?-1:1) res (neg?-1:1) neg -1 1 1 public boolean ready() throws IOException {return br.ready();} ready {return br.ready();} return br.ready(); br.ready() br.ready br public class Main {

	public static void main (String [] args) throws IOException

	{
		Scanner s=new Scanner(System.in);
		PrintWriter pw=new PrintWriter(System.out);

		int a=s.nextInt(),b=s.nextInt(),c=s.nextInt(),d=s.nextInt();
		long max=Long.MIN_VALUE;
		int x=Math.max(a,b);
		long y=Math.max(c,d);
		max=Math.max(max,x*y);

		x=Math.min(a,b);
		y=Math.min(c,d);
		max=Math.max(max,x*y);

		x=Math.min(a,b);
		y=Math.max(c,d);
		max=Math.max(max,x*y);


		x=Math.max(a,b);
		y=Math.min(c,d);
		max=Math.max(max,x*y);
		pw.println(max);


		pw.flush();

}


















	public static void shuffle(int[] a)
	{
		int n = a.length;
		for(int i = 0; i < n; i++)
		{
			int r = i + (int)(Math.random() * (n - i));
			int tmp = a[i];
			a[i] = a[r];
			a[r] = tmp;
		}
	}

	/*

	 try {
		    Thread.sleep(2000);
		} catch(InterruptedException ex) {
		    Thread.currentThread().interrupt();
		}

	 */



	static class Scanner
{
	StringTokenizer st;
	BufferedReader br;

	public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

	public String next() throws IOException
	{
		while (st == null || !st.hasMoreTokens())
			st = new StringTokenizer(br.readLine());
		return st.nextToken();
	}

	public int nextInt() throws IOException {return Integer.parseInt(next());}

	public long nextLong() throws IOException {return Long.parseLong(next());}

	public String nextLine() throws IOException {return br.readLine();}

	public double nextDouble() throws IOException
	{
		String x = next();
		StringBuilder sb = new StringBuilder("0");
		double res = 0, f = 1;
		boolean dec = false, neg = false;
		int start = 0;
		if(x.charAt(0) == '-')
		{
			neg = true;
			start++;
		}
		for(int i = start; i < x.length(); i++)
			if(x.charAt(i) == '.')
			{
				res = Long.parseLong(sb.toString());
				sb = new StringBuilder("0");
				dec = true;
			}
			else
			{
				sb.append(x.charAt(i));
				if(dec)
					f *= 10;
			}
		res += Long.parseLong(sb.toString()) / f;
		return res * (neg?-1:1);
	}

	public boolean ready() throws IOException {return br.ready();}


}
} public class Main {

	public static void main (String [] args) throws IOException

	{
		Scanner s=new Scanner(System.in);
		PrintWriter pw=new PrintWriter(System.out);

		int a=s.nextInt(),b=s.nextInt(),c=s.nextInt(),d=s.nextInt();
		long max=Long.MIN_VALUE;
		int x=Math.max(a,b);
		long y=Math.max(c,d);
		max=Math.max(max,x*y);

		x=Math.min(a,b);
		y=Math.min(c,d);
		max=Math.max(max,x*y);

		x=Math.min(a,b);
		y=Math.max(c,d);
		max=Math.max(max,x*y);


		x=Math.max(a,b);
		y=Math.min(c,d);
		max=Math.max(max,x*y);
		pw.println(max);


		pw.flush();

}


















	public static void shuffle(int[] a)
	{
		int n = a.length;
		for(int i = 0; i < n; i++)
		{
			int r = i + (int)(Math.random() * (n - i));
			int tmp = a[i];
			a[i] = a[r];
			a[r] = tmp;
		}
	}

	/*

	 try {
		    Thread.sleep(2000);
		} catch(InterruptedException ex) {
		    Thread.currentThread().interrupt();
		}

	 */



	static class Scanner
{
	StringTokenizer st;
	BufferedReader br;

	public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

	public String next() throws IOException
	{
		while (st == null || !st.hasMoreTokens())
			st = new StringTokenizer(br.readLine());
		return st.nextToken();
	}

	public int nextInt() throws IOException {return Integer.parseInt(next());}

	public long nextLong() throws IOException {return Long.parseLong(next());}

	public String nextLine() throws IOException {return br.readLine();}

	public double nextDouble() throws IOException
	{
		String x = next();
		StringBuilder sb = new StringBuilder("0");
		double res = 0, f = 1;
		boolean dec = false, neg = false;
		int start = 0;
		if(x.charAt(0) == '-')
		{
			neg = true;
			start++;
		}
		for(int i = start; i < x.length(); i++)
			if(x.charAt(i) == '.')
			{
				res = Long.parseLong(sb.toString());
				sb = new StringBuilder("0");
				dec = true;
			}
			else
			{
				sb.append(x.charAt(i));
				if(dec)
					f *= 10;
			}
		res += Long.parseLong(sb.toString()) / f;
		return res * (neg?-1:1);
	}

	public boolean ready() throws IOException {return br.ready();}


}
} Main
import java.util.*;
import java.io.*;
import java.util.Arrays;
public class Main {

	public static void main (String [] args) throws IOException

	{
		Scanner s=new Scanner(System.in);
		PrintWriter pw=new PrintWriter(System.out);

		int a=s.nextInt(),b=s.nextInt(),c=s.nextInt(),d=s.nextInt();
		long max=Long.MIN_VALUE;
		int x=Math.max(a,b);
		long y=Math.max(c,d);
		max=Math.max(max,x*y);

		x=Math.min(a,b);
		y=Math.min(c,d);
		max=Math.max(max,x*y);

		x=Math.min(a,b);
		y=Math.max(c,d);
		max=Math.max(max,x*y);


		x=Math.max(a,b);
		y=Math.min(c,d);
		max=Math.max(max,x*y);
		pw.println(max);


		pw.flush();

}


















	public static void shuffle(int[] a)
	{
		int n = a.length;
		for(int i = 0; i < n; i++)
		{
			int r = i + (int)(Math.random() * (n - i));
			int tmp = a[i];
			a[i] = a[r];
			a[r] = tmp;
		}
	}

	/*

	 try {
		    Thread.sleep(2000);
		} catch(InterruptedException ex) {
		    Thread.currentThread().interrupt();
		}

	 */



	static class Scanner
{
	StringTokenizer st;
	BufferedReader br;

	public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

	public String next() throws IOException
	{
		while (st == null || !st.hasMoreTokens())
			st = new StringTokenizer(br.readLine());
		return st.nextToken();
	}

	public int nextInt() throws IOException {return Integer.parseInt(next());}

	public long nextLong() throws IOException {return Long.parseLong(next());}

	public String nextLine() throws IOException {return br.readLine();}

	public double nextDouble() throws IOException
	{
		String x = next();
		StringBuilder sb = new StringBuilder("0");
		double res = 0, f = 1;
		boolean dec = false, neg = false;
		int start = 0;
		if(x.charAt(0) == '-')
		{
			neg = true;
			start++;
		}
		for(int i = start; i < x.length(); i++)
			if(x.charAt(i) == '.')
			{
				res = Long.parseLong(sb.toString());
				sb = new StringBuilder("0");
				dec = true;
			}
			else
			{
				sb.append(x.charAt(i));
				if(dec)
					f *= 10;
			}
		res += Long.parseLong(sb.toString()) / f;
		return res * (neg?-1:1);
	}

	public boolean ready() throws IOException {return br.ready();}


}
}