
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();
		
		
		
		if(b * d < 0 && a * c < 0) {
			if(a * d > b * c) {
				System.out.println(a * d);
			} else {
				System.out.println(b * c);
			}
		}	else if(b * d >= a * c) {
			System.out.println(b * d);
		}   else {
			System.out.println(a * c);
		}
	}
}
 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();
		
		
		
		if(b * d < 0 && a * c < 0) {
			if(a * d > b * c) {
				System.out.println(a * d);
			} else {
				System.out.println(b * c);
			}
		}	else if(b * d >= a * c) {
			System.out.println(b * d);
		}   else {
			System.out.println(a * c);
		}
	}
} 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();
		
		
		
		if(b * d < 0 && a * c < 0) {
			if(a * d > b * c) {
				System.out.println(a * d);
			} else {
				System.out.println(b * c);
			}
		}	else if(b * d >= a * c) {
			System.out.println(b * d);
		}   else {
			System.out.println(a * c);
		}
	} main {

		Scanner sc = new Scanner(System.in);

		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();
		
		
		
		if(b * d < 0 && a * c < 0) {
			if(a * d > b * c) {
				System.out.println(a * d);
			} else {
				System.out.println(b * c);
			}
		}	else if(b * d >= a * c) {
			System.out.println(b * d);
		}   else {
			System.out.println(a * c);
		}
	} 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 if(b * d < 0 && a * c < 0) {
			if(a * d > b * c) {
				System.out.println(a * d);
			} else {
				System.out.println(b * c);
			}
		}	else if(b * d >= a * c) {
			System.out.println(b * d);
		}   else {
			System.out.println(a * c);
		} b * d < 0 && a * c < 0 b * d < 0 b * d b d 0 a * c < 0 a * c a c 0 {
			if(a * d > b * c) {
				System.out.println(a * d);
			} else {
				System.out.println(b * c);
			}
		} if(a * d > b * c) {
				System.out.println(a * d);
			} else {
				System.out.println(b * c);
			} a * d > b * c a * d a d b * c b c {
				System.out.println(a * d);
			} System.out.println(a * d) System.out.println System.out System System.out a * d a d {
				System.out.println(b * c);
			} System.out.println(b * c) System.out.println System.out System System.out b * c b c if(b * d >= a * c) {
			System.out.println(b * d);
		}   else {
			System.out.println(a * c);
		} b * d >= a * c b * d b d a * c a c {
			System.out.println(b * d);
		} System.out.println(b * d) System.out.println System.out System System.out b * d b d {
			System.out.println(a * c);
		} System.out.println(a * c) System.out.println System.out System System.out a * c a c 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();
		
		
		
		if(b * d < 0 && a * c < 0) {
			if(a * d > b * c) {
				System.out.println(a * d);
			} else {
				System.out.println(b * c);
			}
		}	else if(b * d >= a * c) {
			System.out.println(b * d);
		}   else {
			System.out.println(a * c);
		}
	}
} 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();
		
		
		
		if(b * d < 0 && a * c < 0) {
			if(a * d > b * c) {
				System.out.println(a * d);
			} else {
				System.out.println(b * c);
			}
		}	else if(b * d >= a * c) {
			System.out.println(b * d);
		}   else {
			System.out.println(a * c);
		}
	}
} 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();
		
		
		
		if(b * d < 0 && a * c < 0) {
			if(a * d > b * c) {
				System.out.println(a * d);
			} else {
				System.out.println(b * c);
			}
		}	else if(b * d >= a * c) {
			System.out.println(b * d);
		}   else {
			System.out.println(a * c);
		}
	}
}

