import java.util.Arrays;
import java.util.Comparator;
import java.util.Optional;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int d = sc.nextInt();

		long ac = (long)a*c;
		long ad = (long)a*d;
		long bc = (long)b*c;
		long bd = (long)b*d;

		Optional<Long> max = Arrays.asList(ac,ad,bc,bd).stream().max(Comparator.naturalOrder());

		System.out.println(max.get());

	}
} import java.util.Arrays; Arrays java.util import java.util.Comparator; Comparator java.util import java.util.Optional; Optional java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int d = sc.nextInt();

		long ac = (long)a*c;
		long ad = (long)a*d;
		long bc = (long)b*c;
		long bd = (long)b*d;

		Optional<Long> max = Arrays.asList(ac,ad,bc,bd).stream().max(Comparator.naturalOrder());

		System.out.println(max.get());

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

		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int d = sc.nextInt();

		long ac = (long)a*c;
		long ad = (long)a*d;
		long bc = (long)b*c;
		long bd = (long)b*d;

		Optional<Long> max = Arrays.asList(ac,ad,bc,bd).stream().max(Comparator.naturalOrder());

		System.out.println(max.get());

	} main {

		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int d = sc.nextInt();

		long ac = (long)a*c;
		long ad = (long)a*d;
		long bc = (long)b*c;
		long bd = (long)b*d;

		Optional<Long> max = Arrays.asList(ac,ad,bc,bd).stream().max(Comparator.naturalOrder());

		System.out.println(max.get());

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int c = sc.nextInt(); c sc.nextInt() sc.nextInt sc int d = sc.nextInt(); d sc.nextInt() sc.nextInt sc long ac = (long)a*c; ac (long)a*c (long)a c long ad = (long)a*d; ad (long)a*d (long)a d long bc = (long)b*c; bc (long)b*c (long)b c long bd = (long)b*d; bd (long)b*d (long)b d Optional<Long> max = Arrays.asList(ac,ad,bc,bd).stream().max(Comparator.naturalOrder()); max Arrays.asList(ac,ad,bc,bd).stream().max(Comparator.naturalOrder()) Arrays.asList(ac,ad,bc,bd).stream().max Arrays.asList(ac,ad,bc,bd).stream() Arrays.asList(ac,ad,bc,bd).stream Arrays.asList(ac,ad,bc,bd) Arrays.asList Arrays ac ad bc bd Comparator.naturalOrder() Comparator.naturalOrder Comparator System.out.println(max.get()) System.out.println System.out System System.out max.get() max.get max String[] args args public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int d = sc.nextInt();

		long ac = (long)a*c;
		long ad = (long)a*d;
		long bc = (long)b*c;
		long bd = (long)b*d;

		Optional<Long> max = Arrays.asList(ac,ad,bc,bd).stream().max(Comparator.naturalOrder());

		System.out.println(max.get());

	}
} public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int d = sc.nextInt();

		long ac = (long)a*c;
		long ad = (long)a*d;
		long bc = (long)b*c;
		long bd = (long)b*d;

		Optional<Long> max = Arrays.asList(ac,ad,bc,bd).stream().max(Comparator.naturalOrder());

		System.out.println(max.get());

	}
} Main
import java.util.Arrays;
import java.util.Comparator;
import java.util.Optional;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int d = sc.nextInt();

		long ac = (long)a*c;
		long ad = (long)a*d;
		long bc = (long)b*c;
		long bd = (long)b*d;

		Optional<Long> max = Arrays.asList(ac,ad,bc,bd).stream().max(Comparator.naturalOrder());

		System.out.println(max.get());

	}
}