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 temp1 = Math.max(a * c, a * d);
		long temp2 = Math.max(b * c, b * d);
		
		System.out.println(Math.max(temp1, temp2));
		sc.close();
	}
}

 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 temp1 = Math.max(a * c, a * d);
		long temp2 = Math.max(b * c, b * d);
		
		System.out.println(Math.max(temp1, temp2));
		sc.close();
	}
} 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 temp1 = Math.max(a * c, a * d);
		long temp2 = Math.max(b * c, b * d);
		
		System.out.println(Math.max(temp1, temp2));
		sc.close();
	} main {
		
		Scanner sc = new Scanner(System.in);
		long a  = sc.nextLong();
		long b  = sc.nextLong();
		long c  = sc.nextLong();
		long d  = sc.nextLong();
		long temp1 = Math.max(a * c, a * d);
		long temp2 = Math.max(b * c, b * d);
		
		System.out.println(Math.max(temp1, temp2));
		sc.close();
	} 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 temp1 = Math.max(a * c, a * d); temp1 Math.max(a * c, a * d) Math.max Math a * c a c a * d a d long temp2 = Math.max(b * c, b * d); temp2 Math.max(b * c, b * d) Math.max Math b * c b c b * d b d System.out.println(Math.max(temp1, temp2)) System.out.println System.out System System.out Math.max(temp1, temp2) Math.max Math temp1 temp2 sc.close() sc.close sc 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 temp1 = Math.max(a * c, a * d);
		long temp2 = Math.max(b * c, b * d);
		
		System.out.println(Math.max(temp1, temp2));
		sc.close();
	}
} 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 temp1 = Math.max(a * c, a * d);
		long temp2 = Math.max(b * c, b * d);
		
		System.out.println(Math.max(temp1, temp2));
		sc.close();
	}
} 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 temp1 = Math.max(a * c, a * d);
		long temp2 = Math.max(b * c, b * d);
		
		System.out.println(Math.max(temp1, temp2));
		sc.close();
	}
}


