import java.util.*;

public class Main{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      	while(sc.hasNext()){
        	long a = sc.nextInt();
          	long b = sc.nextInt();
          	long c = sc.nextInt();
          	long d = sc.nextInt();
          	long ans = Math.max(Math.max(a*c,a*d), Math.max(b*c, b*d));
          	System.out.println(ans);
        }
    }
} import java.util.*; util.* java public class Main{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      	while(sc.hasNext()){
        	long a = sc.nextInt();
          	long b = sc.nextInt();
          	long c = sc.nextInt();
          	long d = sc.nextInt();
          	long ans = Math.max(Math.max(a*c,a*d), Math.max(b*c, b*d));
          	System.out.println(ans);
        }
    }
} Main public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      	while(sc.hasNext()){
        	long a = sc.nextInt();
          	long b = sc.nextInt();
          	long c = sc.nextInt();
          	long d = sc.nextInt();
          	long ans = Math.max(Math.max(a*c,a*d), Math.max(b*c, b*d));
          	System.out.println(ans);
        }
    } main {
    	Scanner sc = new Scanner(System.in);
      	while(sc.hasNext()){
        	long a = sc.nextInt();
          	long b = sc.nextInt();
          	long c = sc.nextInt();
          	long d = sc.nextInt();
          	long ans = Math.max(Math.max(a*c,a*d), Math.max(b*c, b*d));
          	System.out.println(ans);
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while(sc.hasNext()){
        	long a = sc.nextInt();
          	long b = sc.nextInt();
          	long c = sc.nextInt();
          	long d = sc.nextInt();
          	long ans = Math.max(Math.max(a*c,a*d), Math.max(b*c, b*d));
          	System.out.println(ans);
        } sc.hasNext() sc.hasNext sc {
        	long a = sc.nextInt();
          	long b = sc.nextInt();
          	long c = sc.nextInt();
          	long d = sc.nextInt();
          	long ans = Math.max(Math.max(a*c,a*d), Math.max(b*c, b*d));
          	System.out.println(ans);
        } long a = sc.nextInt(); a sc.nextInt() sc.nextInt sc long b = sc.nextInt(); b sc.nextInt() sc.nextInt sc long c = sc.nextInt(); c sc.nextInt() sc.nextInt sc long d = sc.nextInt(); d sc.nextInt() sc.nextInt sc long ans = Math.max(Math.max(a*c,a*d), Math.max(b*c, b*d)); ans Math.max(Math.max(a*c,a*d), Math.max(b*c, b*d)) Math.max Math Math.max(a*c,a*d) Math.max Math a*c a c a*d a d Math.max(b*c, b*d) Math.max Math b*c b c b*d b d System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      	while(sc.hasNext()){
        	long a = sc.nextInt();
          	long b = sc.nextInt();
          	long c = sc.nextInt();
          	long d = sc.nextInt();
          	long ans = Math.max(Math.max(a*c,a*d), Math.max(b*c, b*d));
          	System.out.println(ans);
        }
    }
} public class Main{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      	while(sc.hasNext()){
        	long a = sc.nextInt();
          	long b = sc.nextInt();
          	long c = sc.nextInt();
          	long d = sc.nextInt();
          	long ans = Math.max(Math.max(a*c,a*d), Math.max(b*c, b*d));
          	System.out.println(ans);
        }
    }
} Main
import java.util.*;

public class Main{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      	while(sc.hasNext()){
        	long a = sc.nextInt();
          	long b = sc.nextInt();
          	long c = sc.nextInt();
          	long d = sc.nextInt();
          	long ans = Math.max(Math.max(a*c,a*d), Math.max(b*c, b*d));
          	System.out.println(ans);
        }
    }
}