import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();

		long max = a * c;

		if(a * d > max) {
			max = a * d;
		}

		if(b * c > max) {
			max = b * c;
		}

		if(b * d > max) {
			max = b * d;
		}

		System.out.println(max);
	}

} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();

		long max = a * c;

		if(a * d > max) {
			max = a * d;
		}

		if(b * c > max) {
			max = b * c;
		}

		if(b * d > max) {
			max = b * d;
		}

		System.out.println(max);
	}

} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();

		long max = a * c;

		if(a * d > max) {
			max = a * d;
		}

		if(b * c > max) {
			max = b * c;
		}

		if(b * d > max) {
			max = b * d;
		}

		System.out.println(max);
	} main {
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();

		long max = a * c;

		if(a * d > max) {
			max = a * d;
		}

		if(b * c > max) {
			max = b * c;
		}

		if(b * d > max) {
			max = b * d;
		}

		System.out.println(max);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long a = sc.nextLong(); a sc.nextLong() sc.nextLong sc long b = sc.nextLong(); b sc.nextLong() sc.nextLong sc long c = sc.nextLong(); c sc.nextLong() sc.nextLong sc long d = sc.nextLong(); d sc.nextLong() sc.nextLong sc long max = a * c; max a * c a c if(a * d > max) {
			max = a * d;
		} a * d > max a * d a d max {
			max = a * d;
		} max = a * d max a * d a d if(b * c > max) {
			max = b * c;
		} b * c > max b * c b c max {
			max = b * c;
		} max = b * c max b * c b c if(b * d > max) {
			max = b * d;
		} b * d > max b * d b d max {
			max = b * d;
		} max = b * d max b * d b d System.out.println(max) System.out.println System.out System System.out max String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();

		long max = a * c;

		if(a * d > max) {
			max = a * d;
		}

		if(b * c > max) {
			max = b * c;
		}

		if(b * d > max) {
			max = b * d;
		}

		System.out.println(max);
	}

} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();

		long max = a * c;

		if(a * d > max) {
			max = a * d;
		}

		if(b * c > max) {
			max = b * c;
		}

		if(b * d > max) {
			max = b * d;
		}

		System.out.println(max);
	}

} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();

		long max = a * c;

		if(a * d > max) {
			max = a * d;
		}

		if(b * c > max) {
			max = b * c;
		}

		if(b * d > max) {
			max = b * d;
		}

		System.out.println(max);
	}

}