import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
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();

		List<Long> result = new ArrayList<>();

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

		Collections.sort(result);

		System.out.println(result.get(3));
	}
} import java.math.BigInteger; BigInteger java.math import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.List; List java.util 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();

		List<Long> result = new ArrayList<>();

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

		Collections.sort(result);

		System.out.println(result.get(3));
	}
} 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();

		List<Long> result = new ArrayList<>();

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

		Collections.sort(result);

		System.out.println(result.get(3));
	} 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();

		List<Long> result = new ArrayList<>();

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

		Collections.sort(result);

		System.out.println(result.get(3));
	} 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 List<Long> result = new ArrayList<>(); result new ArrayList<>() result.add(a * c) result.add result a * c a c result.add(a * d) result.add result a * d a d result.add(b * c) result.add result b * c b c result.add(b * d) result.add result b * d b d Collections.sort(result) Collections.sort Collections result System.out.println(result.get(3)) System.out.println System.out System System.out result.get(3) result.get result 3 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();

		List<Long> result = new ArrayList<>();

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

		Collections.sort(result);

		System.out.println(result.get(3));
	}
} 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();

		List<Long> result = new ArrayList<>();

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

		Collections.sort(result);

		System.out.println(result.get(3));
	}
} Main
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
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();

		List<Long> result = new ArrayList<>();

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

		Collections.sort(result);

		System.out.println(result.get(3));
	}
}
