import java.awt.*;
import java.io.*;
import java.util.*;
 
public class Main {
	Scanner sc = new Scanner(System.in);
	public static void main(String[] args){
		new Main();
	}
	public Main(){
		new TestB().doIt();
	}
	class TestB{
		void doIt() {
			long a = sc.nextLong();
			long b = sc.nextLong();
			long c = sc.nextLong();
			long d = sc.nextLong();
			long ac = a*c;
			long ad = a*d;
			long bc = b*c;
			long bd = b*d;
			long max = Math.max(ac, Math.max(ad, Math.max(bc, bd)));
			System.out.println(max);
		}
	}
} import java.awt.*; awt.* java import java.io.*; io.* java import java.util.*; util.* java public class Main {
	Scanner sc = new Scanner(System.in);
	public static void main(String[] args){
		new Main();
	}
	public Main(){
		new TestB().doIt();
	}
	class TestB{
		void doIt() {
			long a = sc.nextLong();
			long b = sc.nextLong();
			long c = sc.nextLong();
			long d = sc.nextLong();
			long ac = a*c;
			long ad = a*d;
			long bc = b*c;
			long bd = b*d;
			long max = Math.max(ac, Math.max(ad, Math.max(bc, bd)));
			System.out.println(max);
		}
	}
} Main Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args){
		new Main();
	} main {
		new Main();
	} new Main() String[] args args public Main(){
		new TestB().doIt();
	} Main {
		new TestB().doIt();
	} new TestB().doIt() new TestB().doIt new TestB() class TestB{
		void doIt() {
			long a = sc.nextLong();
			long b = sc.nextLong();
			long c = sc.nextLong();
			long d = sc.nextLong();
			long ac = a*c;
			long ad = a*d;
			long bc = b*c;
			long bd = b*d;
			long max = Math.max(ac, Math.max(ad, Math.max(bc, bd)));
			System.out.println(max);
		}
	} TestB void doIt() {
			long a = sc.nextLong();
			long b = sc.nextLong();
			long c = sc.nextLong();
			long d = sc.nextLong();
			long ac = a*c;
			long ad = a*d;
			long bc = b*c;
			long bd = b*d;
			long max = Math.max(ac, Math.max(ad, Math.max(bc, bd)));
			System.out.println(max);
		} doIt {
			long a = sc.nextLong();
			long b = sc.nextLong();
			long c = sc.nextLong();
			long d = sc.nextLong();
			long ac = a*c;
			long ad = a*d;
			long bc = b*c;
			long bd = b*d;
			long max = Math.max(ac, Math.max(ad, Math.max(bc, bd)));
			System.out.println(max);
		} 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 ac = a*c; ac a*c a c long ad = a*d; ad a*d a d long bc = b*c; bc b*c b c long bd = b*d; bd b*d b d long max = Math.max(ac, Math.max(ad, Math.max(bc, bd))); max Math.max(ac, Math.max(ad, Math.max(bc, bd))) Math.max Math ac Math.max(ad, Math.max(bc, bd)) Math.max Math ad Math.max(bc, bd) Math.max Math bc bd System.out.println(max) System.out.println System.out System System.out max public class Main {
	Scanner sc = new Scanner(System.in);
	public static void main(String[] args){
		new Main();
	}
	public Main(){
		new TestB().doIt();
	}
	class TestB{
		void doIt() {
			long a = sc.nextLong();
			long b = sc.nextLong();
			long c = sc.nextLong();
			long d = sc.nextLong();
			long ac = a*c;
			long ad = a*d;
			long bc = b*c;
			long bd = b*d;
			long max = Math.max(ac, Math.max(ad, Math.max(bc, bd)));
			System.out.println(max);
		}
	}
} public class Main {
	Scanner sc = new Scanner(System.in);
	public static void main(String[] args){
		new Main();
	}
	public Main(){
		new TestB().doIt();
	}
	class TestB{
		void doIt() {
			long a = sc.nextLong();
			long b = sc.nextLong();
			long c = sc.nextLong();
			long d = sc.nextLong();
			long ac = a*c;
			long ad = a*d;
			long bc = b*c;
			long bd = b*d;
			long max = Math.max(ac, Math.max(ad, Math.max(bc, bd)));
			System.out.println(max);
		}
	}
} Main
import java.awt.*;
import java.io.*;
import java.util.*;
 
public class Main {
	Scanner sc = new Scanner(System.in);
	public static void main(String[] args){
		new Main();
	}
	public Main(){
		new TestB().doIt();
	}
	class TestB{
		void doIt() {
			long a = sc.nextLong();
			long b = sc.nextLong();
			long c = sc.nextLong();
			long d = sc.nextLong();
			long ac = a*c;
			long ad = a*d;
			long bc = b*c;
			long bd = b*d;
			long max = Math.max(ac, Math.max(ad, Math.max(bc, bd)));
			System.out.println(max);
		}
	}
}