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();
		
		sc.close();
		
		// 結果の出力
		long ac = a * c;
		long ad = a * d;
		long bc = b * c;
		long bd = b * d;
		System.out.println(Math.max(ac, Math.max(ad, Math.max(bc, bd))));
	}
} 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();
		
		sc.close();
		
		// 結果の出力
		long ac = a * c;
		long ad = a * d;
		long bc = b * c;
		long bd = b * d;
		System.out.println(Math.max(ac, Math.max(ad, Math.max(bc, bd))));
	}
} 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();
		
		sc.close();
		
		// 結果の出力
		long ac = a * c;
		long ad = a * d;
		long bc = b * c;
		long bd = b * d;
		System.out.println(Math.max(ac, Math.max(ad, Math.max(bc, bd))));
	} main {
		Scanner sc = new Scanner(System.in);

		// 入力値の取得
		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();
		
		sc.close();
		
		// 結果の出力
		long ac = a * c;
		long ad = a * d;
		long bc = b * c;
		long bd = b * d;
		System.out.println(Math.max(ac, Math.max(ad, Math.max(bc, bd))));
	} 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 sc.close() sc.close sc long ac = a * c; ac a * c a c long ad = a * d; ad a * d a d long bc = b * c; bc b * c b c long bd = b * d; bd b * d b d System.out.println(Math.max(ac, Math.max(ad, Math.max(bc, bd)))) System.out.println System.out System System.out Math.max(ac, Math.max(ad, Math.max(bc, bd))) Math.max Math ac Math.max(ad, Math.max(bc, bd)) Math.max Math ad Math.max(bc, bd) Math.max Math bc bd 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();
		
		sc.close();
		
		// 結果の出力
		long ac = a * c;
		long ad = a * d;
		long bc = b * c;
		long bd = b * d;
		System.out.println(Math.max(ac, Math.max(ad, Math.max(bc, bd))));
	}
} 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();
		
		sc.close();
		
		// 結果の出力
		long ac = a * c;
		long ad = a * d;
		long bc = b * c;
		long bd = b * d;
		System.out.println(Math.max(ac, Math.max(ad, Math.max(bc, bd))));
	}
} 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();
		
		sc.close();
		
		// 結果の出力
		long ac = a * c;
		long ad = a * d;
		long bc = b * c;
		long bd = b * d;
		System.out.println(Math.max(ac, Math.max(ad, Math.max(bc, bd))));
	}
}
