import java.util.Scanner;

public class Main {


		public static void main(String[] args) {

			Scanner scan = new Scanner(System.in);
			String N = scan.next();
			String [] token = N.split(" ");
			long a = Long.parseLong(token[0]);
			long b = Long.parseLong(scan.next());
			long c = Long.parseLong(scan.next());
			long d = Long.parseLong(scan.next());


			long max = Long.MIN_VALUE;
			max = Math.max(max, b*d);
			max = Math.max(max, a*c);
			max = Math.max(max, a*d);
			max = Math.max(max, b*c);
			System.out.println(max);
			scan.close();
		}

} import java.util.Scanner; Scanner java.util public class Main {


		public static void main(String[] args) {

			Scanner scan = new Scanner(System.in);
			String N = scan.next();
			String [] token = N.split(" ");
			long a = Long.parseLong(token[0]);
			long b = Long.parseLong(scan.next());
			long c = Long.parseLong(scan.next());
			long d = Long.parseLong(scan.next());


			long max = Long.MIN_VALUE;
			max = Math.max(max, b*d);
			max = Math.max(max, a*c);
			max = Math.max(max, a*d);
			max = Math.max(max, b*c);
			System.out.println(max);
			scan.close();
		}

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

			Scanner scan = new Scanner(System.in);
			String N = scan.next();
			String [] token = N.split(" ");
			long a = Long.parseLong(token[0]);
			long b = Long.parseLong(scan.next());
			long c = Long.parseLong(scan.next());
			long d = Long.parseLong(scan.next());


			long max = Long.MIN_VALUE;
			max = Math.max(max, b*d);
			max = Math.max(max, a*c);
			max = Math.max(max, a*d);
			max = Math.max(max, b*c);
			System.out.println(max);
			scan.close();
		} main {

			Scanner scan = new Scanner(System.in);
			String N = scan.next();
			String [] token = N.split(" ");
			long a = Long.parseLong(token[0]);
			long b = Long.parseLong(scan.next());
			long c = Long.parseLong(scan.next());
			long d = Long.parseLong(scan.next());


			long max = Long.MIN_VALUE;
			max = Math.max(max, b*d);
			max = Math.max(max, a*c);
			max = Math.max(max, a*d);
			max = Math.max(max, b*c);
			System.out.println(max);
			scan.close();
		} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String N = scan.next(); N scan.next() scan.next scan String [] token = N.split(" "); token N.split(" ") N.split N " " long a = Long.parseLong(token[0]); a Long.parseLong(token[0]) Long.parseLong Long token[0] token 0 long b = Long.parseLong(scan.next()); b Long.parseLong(scan.next()) Long.parseLong Long scan.next() scan.next scan long c = Long.parseLong(scan.next()); c Long.parseLong(scan.next()) Long.parseLong Long scan.next() scan.next scan long d = Long.parseLong(scan.next()); d Long.parseLong(scan.next()) Long.parseLong Long scan.next() scan.next scan long max = Long.MIN_VALUE; max Long.MIN_VALUE Long Long.MIN_VALUE max = Math.max(max, b*d) max Math.max(max, b*d) Math.max Math max b*d b d max = Math.max(max, a*c) max Math.max(max, a*c) Math.max Math max a*c a c max = Math.max(max, a*d) max Math.max(max, a*d) Math.max Math max a*d a d max = Math.max(max, b*c) max Math.max(max, b*c) Math.max Math max b*c b c System.out.println(max) System.out.println System.out System System.out max scan.close() scan.close scan String[] args args public class Main {


		public static void main(String[] args) {

			Scanner scan = new Scanner(System.in);
			String N = scan.next();
			String [] token = N.split(" ");
			long a = Long.parseLong(token[0]);
			long b = Long.parseLong(scan.next());
			long c = Long.parseLong(scan.next());
			long d = Long.parseLong(scan.next());


			long max = Long.MIN_VALUE;
			max = Math.max(max, b*d);
			max = Math.max(max, a*c);
			max = Math.max(max, a*d);
			max = Math.max(max, b*c);
			System.out.println(max);
			scan.close();
		}

} public class Main {


		public static void main(String[] args) {

			Scanner scan = new Scanner(System.in);
			String N = scan.next();
			String [] token = N.split(" ");
			long a = Long.parseLong(token[0]);
			long b = Long.parseLong(scan.next());
			long c = Long.parseLong(scan.next());
			long d = Long.parseLong(scan.next());


			long max = Long.MIN_VALUE;
			max = Math.max(max, b*d);
			max = Math.max(max, a*c);
			max = Math.max(max, a*d);
			max = Math.max(max, b*c);
			System.out.println(max);
			scan.close();
		}

} Main
import java.util.Scanner;

public class Main {


		public static void main(String[] args) {

			Scanner scan = new Scanner(System.in);
			String N = scan.next();
			String [] token = N.split(" ");
			long a = Long.parseLong(token[0]);
			long b = Long.parseLong(scan.next());
			long c = Long.parseLong(scan.next());
			long d = Long.parseLong(scan.next());


			long max = Long.MIN_VALUE;
			max = Math.max(max, b*d);
			max = Math.max(max, a*c);
			max = Math.max(max, a*d);
			max = Math.max(max, b*c);
			System.out.println(max);
			scan.close();
		}

}