import java.util.Scanner;
import java.util.ArrayList;
import java.util.Collections;
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();
		ArrayList<Long> al=new ArrayList<>();
		al.add(a*c);
		al.add(a*d);
		al.add(b*c);
		al.add(b*d);
		Collections.sort(al);
		System.out.println(al.get(al.size()-1));
	}

} import java.util.Scanner; Scanner java.util import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util 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();
		ArrayList<Long> al=new ArrayList<>();
		al.add(a*c);
		al.add(a*d);
		al.add(b*c);
		al.add(b*d);
		Collections.sort(al);
		System.out.println(al.get(al.size()-1));
	}

} 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();
		ArrayList<Long> al=new ArrayList<>();
		al.add(a*c);
		al.add(a*d);
		al.add(b*c);
		al.add(b*d);
		Collections.sort(al);
		System.out.println(al.get(al.size()-1));
	} main {
		Scanner sc=new Scanner(System.in);
		long a=sc.nextLong();
		long b=sc.nextLong();
		long c=sc.nextLong();
		long d=sc.nextLong();
		ArrayList<Long> al=new ArrayList<>();
		al.add(a*c);
		al.add(a*d);
		al.add(b*c);
		al.add(b*d);
		Collections.sort(al);
		System.out.println(al.get(al.size()-1));
	} 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 ArrayList<Long> al=new ArrayList<>(); al new ArrayList<>() al.add(a*c) al.add al a*c a c al.add(a*d) al.add al a*d a d al.add(b*c) al.add al b*c b c al.add(b*d) al.add al b*d b d Collections.sort(al) Collections.sort Collections al System.out.println(al.get(al.size()-1)) System.out.println System.out System System.out al.get(al.size()-1) al.get al al.size()-1 al.size() al.size al 1 String[] args args
import java.util.Scanner;
import java.util.ArrayList;
import java.util.Collections;
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();
		ArrayList<Long> al=new ArrayList<>();
		al.add(a*c);
		al.add(a*d);
		al.add(b*c);
		al.add(b*d);
		Collections.sort(al);
		System.out.println(al.get(al.size()-1));
	}

}
