import java.util.Scanner;

/**
 * @author yadavd5
 *
 */
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 first= a*c;
		long  second = a*d;
		long third = b*c;
		long fourth = b*d;
		long firstmax = Math.max(first, second);
		long secondman = Math.max(third, fourth);
		System.out.println(Math.max(firstmax, secondman));
	}

} 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 first= a*c;
		long  second = a*d;
		long third = b*c;
		long fourth = b*d;
		long firstmax = Math.max(first, second);
		long secondman = Math.max(third, fourth);
		System.out.println(Math.max(firstmax, secondman));
	}

} 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 first= a*c;
		long  second = a*d;
		long third = b*c;
		long fourth = b*d;
		long firstmax = Math.max(first, second);
		long secondman = Math.max(third, fourth);
		System.out.println(Math.max(firstmax, secondman));
	} main {
		Scanner sc = new Scanner(System.in);
		long  a = sc.nextLong();
		long  b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();
		long first= a*c;
		long  second = a*d;
		long third = b*c;
		long fourth = b*d;
		long firstmax = Math.max(first, second);
		long secondman = Math.max(third, fourth);
		System.out.println(Math.max(firstmax, secondman));
	} 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 first= a*c; first a*c a c long  second = a*d; second a*d a d long third = b*c; third b*c b c long fourth = b*d; fourth b*d b d long firstmax = Math.max(first, second); firstmax Math.max(first, second) Math.max Math first second long secondman = Math.max(third, fourth); secondman Math.max(third, fourth) Math.max Math third fourth System.out.println(Math.max(firstmax, secondman)) System.out.println System.out System System.out Math.max(firstmax, secondman) Math.max Math firstmax secondman 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 first= a*c;
		long  second = a*d;
		long third = b*c;
		long fourth = b*d;
		long firstmax = Math.max(first, second);
		long secondman = Math.max(third, fourth);
		System.out.println(Math.max(firstmax, secondman));
	}

} 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 first= a*c;
		long  second = a*d;
		long third = b*c;
		long fourth = b*d;
		long firstmax = Math.max(first, second);
		long secondman = Math.max(third, fourth);
		System.out.println(Math.max(firstmax, secondman));
	}

} Main
import java.util.Scanner;

/**
 * @author yadavd5
 *
 */
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 first= a*c;
		long  second = a*d;
		long third = b*c;
		long fourth = b*d;
		long firstmax = Math.max(first, second);
		long secondman = Math.max(third, fourth);
		System.out.println(Math.max(firstmax, secondman));
	}

}