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 e = Math.max(a,b) * Math.max(c, d);
		long f = Math.max(a,b) * Math.min(c, d);
		long g = Math.min(a,b) * Math.max(c, d);
		long h = Math.min(a,b) * Math.min(c, d);
		System.out.println(Math.max(Math.max(e,f),Math.max(g, h)));

	}

} 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 e = Math.max(a,b) * Math.max(c, d);
		long f = Math.max(a,b) * Math.min(c, d);
		long g = Math.min(a,b) * Math.max(c, d);
		long h = Math.min(a,b) * Math.min(c, d);
		System.out.println(Math.max(Math.max(e,f),Math.max(g, h)));

	}

} 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 e = Math.max(a,b) * Math.max(c, d);
		long f = Math.max(a,b) * Math.min(c, d);
		long g = Math.min(a,b) * Math.max(c, d);
		long h = Math.min(a,b) * Math.min(c, d);
		System.out.println(Math.max(Math.max(e,f),Math.max(g, h)));

	} main {

		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();
		long e = Math.max(a,b) * Math.max(c, d);
		long f = Math.max(a,b) * Math.min(c, d);
		long g = Math.min(a,b) * Math.max(c, d);
		long h = Math.min(a,b) * Math.min(c, d);
		System.out.println(Math.max(Math.max(e,f),Math.max(g, h)));

	} 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 e = Math.max(a,b) * Math.max(c, d); e Math.max(a,b) * Math.max(c, d) Math.max(a,b) Math.max Math a b Math.max(c, d) Math.max Math c d long f = Math.max(a,b) * Math.min(c, d); f Math.max(a,b) * Math.min(c, d) Math.max(a,b) Math.max Math a b Math.min(c, d) Math.min Math c d long g = Math.min(a,b) * Math.max(c, d); g Math.min(a,b) * Math.max(c, d) Math.min(a,b) Math.min Math a b Math.max(c, d) Math.max Math c d long h = Math.min(a,b) * Math.min(c, d); h Math.min(a,b) * Math.min(c, d) Math.min(a,b) Math.min Math a b Math.min(c, d) Math.min Math c d System.out.println(Math.max(Math.max(e,f),Math.max(g, h))) System.out.println System.out System System.out Math.max(Math.max(e,f),Math.max(g, h)) Math.max Math Math.max(e,f) Math.max Math e f Math.max(g, h) Math.max Math g h 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 e = Math.max(a,b) * Math.max(c, d);
		long f = Math.max(a,b) * Math.min(c, d);
		long g = Math.min(a,b) * Math.max(c, d);
		long h = Math.min(a,b) * Math.min(c, d);
		System.out.println(Math.max(Math.max(e,f),Math.max(g, h)));

	}

} 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 e = Math.max(a,b) * Math.max(c, d);
		long f = Math.max(a,b) * Math.min(c, d);
		long g = Math.min(a,b) * Math.max(c, d);
		long h = Math.min(a,b) * Math.min(c, d);
		System.out.println(Math.max(Math.max(e,f),Math.max(g, h)));

	}

} 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 e = Math.max(a,b) * Math.max(c, d);
		long f = Math.max(a,b) * Math.min(c, d);
		long g = Math.min(a,b) * Math.max(c, d);
		long h = Math.min(a,b) * Math.min(c, d);
		System.out.println(Math.max(Math.max(e,f),Math.max(g, h)));

	}

}
