import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class Main {
	public static void main(String[]args) {
		try(Scanner scan = new Scanner(System.in)){


			long a = scan.nextLong();
			long A = Math.abs(a);
			long b = scan.nextLong();
			long B = Math.abs(b);
			long c = scan.nextLong();
			long C = Math.abs(c);
			long d = scan.nextLong();
			long D = Math.abs(d);



			ArrayList<Long>are =new ArrayList<Long>();

			are.add(a*c);
			are.add(a*d);
			are.add(b*c);
			are.add(b*d);



			Collections.sort(are, Collections.reverseOrder());

			System.out.println(are.get(0));



			/*

			if(0<=a&&0<=b) {
				if(c>=0&&d>=0) {
					System.out.println(b*d);
					return;

				}else if(c<0&&d>=0) {
					System.out.println(b*d);return;
				}else if(c<0&&d<0) {
					System.out.println(Math.max(a*d, b*c));return;
				}




			}

			if(0>a&&0<=b) {
				if(c>=0&&d>=0) {
					System.out.println(b*d);return;
				}else if(c<0&&d>=0) {
					System.out.println(Math.max(a*c, b*d));return;
				}else if(c<0&&d<0) {
					System.out.println(a*c);return;
				}


			}


			if (0>a&&b>0){
				if(c>=0&&d>=0) {
					System.out.println(Math.max(a*d, b*c));return;
				}else if(c<0&&d>=0) {
					System.out.println(a*c);return;
				}else if(c<0&&d<0) {
					System.out.println(a*c);return;
				}

			}

			*/




		}


	}


} import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[]args) {
		try(Scanner scan = new Scanner(System.in)){


			long a = scan.nextLong();
			long A = Math.abs(a);
			long b = scan.nextLong();
			long B = Math.abs(b);
			long c = scan.nextLong();
			long C = Math.abs(c);
			long d = scan.nextLong();
			long D = Math.abs(d);



			ArrayList<Long>are =new ArrayList<Long>();

			are.add(a*c);
			are.add(a*d);
			are.add(b*c);
			are.add(b*d);



			Collections.sort(are, Collections.reverseOrder());

			System.out.println(are.get(0));



			/*

			if(0<=a&&0<=b) {
				if(c>=0&&d>=0) {
					System.out.println(b*d);
					return;

				}else if(c<0&&d>=0) {
					System.out.println(b*d);return;
				}else if(c<0&&d<0) {
					System.out.println(Math.max(a*d, b*c));return;
				}




			}

			if(0>a&&0<=b) {
				if(c>=0&&d>=0) {
					System.out.println(b*d);return;
				}else if(c<0&&d>=0) {
					System.out.println(Math.max(a*c, b*d));return;
				}else if(c<0&&d<0) {
					System.out.println(a*c);return;
				}


			}


			if (0>a&&b>0){
				if(c>=0&&d>=0) {
					System.out.println(Math.max(a*d, b*c));return;
				}else if(c<0&&d>=0) {
					System.out.println(a*c);return;
				}else if(c<0&&d<0) {
					System.out.println(a*c);return;
				}

			}

			*/




		}


	}


} Main public static void main(String[]args) {
		try(Scanner scan = new Scanner(System.in)){


			long a = scan.nextLong();
			long A = Math.abs(a);
			long b = scan.nextLong();
			long B = Math.abs(b);
			long c = scan.nextLong();
			long C = Math.abs(c);
			long d = scan.nextLong();
			long D = Math.abs(d);



			ArrayList<Long>are =new ArrayList<Long>();

			are.add(a*c);
			are.add(a*d);
			are.add(b*c);
			are.add(b*d);



			Collections.sort(are, Collections.reverseOrder());

			System.out.println(are.get(0));



			/*

			if(0<=a&&0<=b) {
				if(c>=0&&d>=0) {
					System.out.println(b*d);
					return;

				}else if(c<0&&d>=0) {
					System.out.println(b*d);return;
				}else if(c<0&&d<0) {
					System.out.println(Math.max(a*d, b*c));return;
				}




			}

			if(0>a&&0<=b) {
				if(c>=0&&d>=0) {
					System.out.println(b*d);return;
				}else if(c<0&&d>=0) {
					System.out.println(Math.max(a*c, b*d));return;
				}else if(c<0&&d<0) {
					System.out.println(a*c);return;
				}


			}


			if (0>a&&b>0){
				if(c>=0&&d>=0) {
					System.out.println(Math.max(a*d, b*c));return;
				}else if(c<0&&d>=0) {
					System.out.println(a*c);return;
				}else if(c<0&&d<0) {
					System.out.println(a*c);return;
				}

			}

			*/




		}


	} main {
		try(Scanner scan = new Scanner(System.in)){


			long a = scan.nextLong();
			long A = Math.abs(a);
			long b = scan.nextLong();
			long B = Math.abs(b);
			long c = scan.nextLong();
			long C = Math.abs(c);
			long d = scan.nextLong();
			long D = Math.abs(d);



			ArrayList<Long>are =new ArrayList<Long>();

			are.add(a*c);
			are.add(a*d);
			are.add(b*c);
			are.add(b*d);



			Collections.sort(are, Collections.reverseOrder());

			System.out.println(are.get(0));



			/*

			if(0<=a&&0<=b) {
				if(c>=0&&d>=0) {
					System.out.println(b*d);
					return;

				}else if(c<0&&d>=0) {
					System.out.println(b*d);return;
				}else if(c<0&&d<0) {
					System.out.println(Math.max(a*d, b*c));return;
				}




			}

			if(0>a&&0<=b) {
				if(c>=0&&d>=0) {
					System.out.println(b*d);return;
				}else if(c<0&&d>=0) {
					System.out.println(Math.max(a*c, b*d));return;
				}else if(c<0&&d<0) {
					System.out.println(a*c);return;
				}


			}


			if (0>a&&b>0){
				if(c>=0&&d>=0) {
					System.out.println(Math.max(a*d, b*c));return;
				}else if(c<0&&d>=0) {
					System.out.println(a*c);return;
				}else if(c<0&&d<0) {
					System.out.println(a*c);return;
				}

			}

			*/




		}


	} try(Scanner scan = new Scanner(System.in)){


			long a = scan.nextLong();
			long A = Math.abs(a);
			long b = scan.nextLong();
			long B = Math.abs(b);
			long c = scan.nextLong();
			long C = Math.abs(c);
			long d = scan.nextLong();
			long D = Math.abs(d);



			ArrayList<Long>are =new ArrayList<Long>();

			are.add(a*c);
			are.add(a*d);
			are.add(b*c);
			are.add(b*d);



			Collections.sort(are, Collections.reverseOrder());

			System.out.println(are.get(0));



			/*

			if(0<=a&&0<=b) {
				if(c>=0&&d>=0) {
					System.out.println(b*d);
					return;

				}else if(c<0&&d>=0) {
					System.out.println(b*d);return;
				}else if(c<0&&d<0) {
					System.out.println(Math.max(a*d, b*c));return;
				}




			}

			if(0>a&&0<=b) {
				if(c>=0&&d>=0) {
					System.out.println(b*d);return;
				}else if(c<0&&d>=0) {
					System.out.println(Math.max(a*c, b*d));return;
				}else if(c<0&&d<0) {
					System.out.println(a*c);return;
				}


			}


			if (0>a&&b>0){
				if(c>=0&&d>=0) {
					System.out.println(Math.max(a*d, b*c));return;
				}else if(c<0&&d>=0) {
					System.out.println(a*c);return;
				}else if(c<0&&d<0) {
					System.out.println(a*c);return;
				}

			}

			*/




		} {


			long a = scan.nextLong();
			long A = Math.abs(a);
			long b = scan.nextLong();
			long B = Math.abs(b);
			long c = scan.nextLong();
			long C = Math.abs(c);
			long d = scan.nextLong();
			long D = Math.abs(d);



			ArrayList<Long>are =new ArrayList<Long>();

			are.add(a*c);
			are.add(a*d);
			are.add(b*c);
			are.add(b*d);



			Collections.sort(are, Collections.reverseOrder());

			System.out.println(are.get(0));



			/*

			if(0<=a&&0<=b) {
				if(c>=0&&d>=0) {
					System.out.println(b*d);
					return;

				}else if(c<0&&d>=0) {
					System.out.println(b*d);return;
				}else if(c<0&&d<0) {
					System.out.println(Math.max(a*d, b*c));return;
				}




			}

			if(0>a&&0<=b) {
				if(c>=0&&d>=0) {
					System.out.println(b*d);return;
				}else if(c<0&&d>=0) {
					System.out.println(Math.max(a*c, b*d));return;
				}else if(c<0&&d<0) {
					System.out.println(a*c);return;
				}


			}


			if (0>a&&b>0){
				if(c>=0&&d>=0) {
					System.out.println(Math.max(a*d, b*c));return;
				}else if(c<0&&d>=0) {
					System.out.println(a*c);return;
				}else if(c<0&&d<0) {
					System.out.println(a*c);return;
				}

			}

			*/




		} Scanner scan = new Scanner(System.in) Scanner scan = new Scanner(System.in) new Scanner(System.in) long a = scan.nextLong(); a scan.nextLong() scan.nextLong scan long A = Math.abs(a); A Math.abs(a) Math.abs Math a long b = scan.nextLong(); b scan.nextLong() scan.nextLong scan long B = Math.abs(b); B Math.abs(b) Math.abs Math b long c = scan.nextLong(); c scan.nextLong() scan.nextLong scan long C = Math.abs(c); C Math.abs(c) Math.abs Math c long d = scan.nextLong(); d scan.nextLong() scan.nextLong scan long D = Math.abs(d); D Math.abs(d) Math.abs Math d ArrayList<Long>are =new ArrayList<Long>(); are new ArrayList<Long>() are.add(a*c) are.add are a*c a c are.add(a*d) are.add are a*d a d are.add(b*c) are.add are b*c b c are.add(b*d) are.add are b*d b d Collections.sort(are, Collections.reverseOrder()) Collections.sort Collections are Collections.reverseOrder() Collections.reverseOrder Collections System.out.println(are.get(0)) System.out.println System.out System System.out are.get(0) are.get are 0 String[]args args public class Main {
	public static void main(String[]args) {
		try(Scanner scan = new Scanner(System.in)){


			long a = scan.nextLong();
			long A = Math.abs(a);
			long b = scan.nextLong();
			long B = Math.abs(b);
			long c = scan.nextLong();
			long C = Math.abs(c);
			long d = scan.nextLong();
			long D = Math.abs(d);



			ArrayList<Long>are =new ArrayList<Long>();

			are.add(a*c);
			are.add(a*d);
			are.add(b*c);
			are.add(b*d);



			Collections.sort(are, Collections.reverseOrder());

			System.out.println(are.get(0));



			/*

			if(0<=a&&0<=b) {
				if(c>=0&&d>=0) {
					System.out.println(b*d);
					return;

				}else if(c<0&&d>=0) {
					System.out.println(b*d);return;
				}else if(c<0&&d<0) {
					System.out.println(Math.max(a*d, b*c));return;
				}




			}

			if(0>a&&0<=b) {
				if(c>=0&&d>=0) {
					System.out.println(b*d);return;
				}else if(c<0&&d>=0) {
					System.out.println(Math.max(a*c, b*d));return;
				}else if(c<0&&d<0) {
					System.out.println(a*c);return;
				}


			}


			if (0>a&&b>0){
				if(c>=0&&d>=0) {
					System.out.println(Math.max(a*d, b*c));return;
				}else if(c<0&&d>=0) {
					System.out.println(a*c);return;
				}else if(c<0&&d<0) {
					System.out.println(a*c);return;
				}

			}

			*/




		}


	}


} public class Main {
	public static void main(String[]args) {
		try(Scanner scan = new Scanner(System.in)){


			long a = scan.nextLong();
			long A = Math.abs(a);
			long b = scan.nextLong();
			long B = Math.abs(b);
			long c = scan.nextLong();
			long C = Math.abs(c);
			long d = scan.nextLong();
			long D = Math.abs(d);



			ArrayList<Long>are =new ArrayList<Long>();

			are.add(a*c);
			are.add(a*d);
			are.add(b*c);
			are.add(b*d);



			Collections.sort(are, Collections.reverseOrder());

			System.out.println(are.get(0));



			/*

			if(0<=a&&0<=b) {
				if(c>=0&&d>=0) {
					System.out.println(b*d);
					return;

				}else if(c<0&&d>=0) {
					System.out.println(b*d);return;
				}else if(c<0&&d<0) {
					System.out.println(Math.max(a*d, b*c));return;
				}




			}

			if(0>a&&0<=b) {
				if(c>=0&&d>=0) {
					System.out.println(b*d);return;
				}else if(c<0&&d>=0) {
					System.out.println(Math.max(a*c, b*d));return;
				}else if(c<0&&d<0) {
					System.out.println(a*c);return;
				}


			}


			if (0>a&&b>0){
				if(c>=0&&d>=0) {
					System.out.println(Math.max(a*d, b*c));return;
				}else if(c<0&&d>=0) {
					System.out.println(a*c);return;
				}else if(c<0&&d<0) {
					System.out.println(a*c);return;
				}

			}

			*/




		}


	}


} Main
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class Main {
	public static void main(String[]args) {
		try(Scanner scan = new Scanner(System.in)){


			long a = scan.nextLong();
			long A = Math.abs(a);
			long b = scan.nextLong();
			long B = Math.abs(b);
			long c = scan.nextLong();
			long C = Math.abs(c);
			long d = scan.nextLong();
			long D = Math.abs(d);



			ArrayList<Long>are =new ArrayList<Long>();

			are.add(a*c);
			are.add(a*d);
			are.add(b*c);
			are.add(b*d);



			Collections.sort(are, Collections.reverseOrder());

			System.out.println(are.get(0));



			/*

			if(0<=a&&0<=b) {
				if(c>=0&&d>=0) {
					System.out.println(b*d);
					return;

				}else if(c<0&&d>=0) {
					System.out.println(b*d);return;
				}else if(c<0&&d<0) {
					System.out.println(Math.max(a*d, b*c));return;
				}




			}

			if(0>a&&0<=b) {
				if(c>=0&&d>=0) {
					System.out.println(b*d);return;
				}else if(c<0&&d>=0) {
					System.out.println(Math.max(a*c, b*d));return;
				}else if(c<0&&d<0) {
					System.out.println(a*c);return;
				}


			}


			if (0>a&&b>0){
				if(c>=0&&d>=0) {
					System.out.println(Math.max(a*d, b*c));return;
				}else if(c<0&&d>=0) {
					System.out.println(a*c);return;
				}else if(c<0&&d<0) {
					System.out.println(a*c);return;
				}

			}

			*/




		}


	}


}
