import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
      	
        // 入力
        long a = sc.nextInt();
      	long b = sc.nextInt();
      	long c = sc.nextInt();
      	long d = sc.nextInt();
      	long max=0;

		if((b<0&&c>0)||(a>0&&d<0)){
          max=Math.max(b*c,a*d);
        }else{
          max=Math.max(a*c,b*d);
        }
      System.out.println(max);

    }
} 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.nextInt();
      	long b = sc.nextInt();
      	long c = sc.nextInt();
      	long d = sc.nextInt();
      	long max=0;

		if((b<0&&c>0)||(a>0&&d<0)){
          max=Math.max(b*c,a*d);
        }else{
          max=Math.max(a*c,b*d);
        }
      System.out.println(max);

    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
      	
        // 入力
        long a = sc.nextInt();
      	long b = sc.nextInt();
      	long c = sc.nextInt();
      	long d = sc.nextInt();
      	long max=0;

		if((b<0&&c>0)||(a>0&&d<0)){
          max=Math.max(b*c,a*d);
        }else{
          max=Math.max(a*c,b*d);
        }
      System.out.println(max);

    } main {
        Scanner sc = new Scanner(System.in);
      	
        // 入力
        long a = sc.nextInt();
      	long b = sc.nextInt();
      	long c = sc.nextInt();
      	long d = sc.nextInt();
      	long max=0;

		if((b<0&&c>0)||(a>0&&d<0)){
          max=Math.max(b*c,a*d);
        }else{
          max=Math.max(a*c,b*d);
        }
      System.out.println(max);

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) 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 max=0; max 0 if((b<0&&c>0)||(a>0&&d<0)){
          max=Math.max(b*c,a*d);
        }else{
          max=Math.max(a*c,b*d);
        } (b<0&&c>0)||(a>0&&d<0) (b<0&&c>0) b<0 b 0 c>0 c 0 (a>0&&d<0) a>0 a 0 d<0 d 0 {
          max=Math.max(b*c,a*d);
        } max=Math.max(b*c,a*d) max Math.max(b*c,a*d) Math.max Math b*c b c a*d a d {
          max=Math.max(a*c,b*d);
        } max=Math.max(a*c,b*d) max Math.max(a*c,b*d) Math.max Math a*c a c b*d b d System.out.println(max) System.out.println System.out System System.out max String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
      	
        // 入力
        long a = sc.nextInt();
      	long b = sc.nextInt();
      	long c = sc.nextInt();
      	long d = sc.nextInt();
      	long max=0;

		if((b<0&&c>0)||(a>0&&d<0)){
          max=Math.max(b*c,a*d);
        }else{
          max=Math.max(a*c,b*d);
        }
      System.out.println(max);

    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
      	
        // 入力
        long a = sc.nextInt();
      	long b = sc.nextInt();
      	long c = sc.nextInt();
      	long d = sc.nextInt();
      	long max=0;

		if((b<0&&c>0)||(a>0&&d<0)){
          max=Math.max(b*c,a*d);
        }else{
          max=Math.max(a*c,b*d);
        }
      System.out.println(max);

    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
      	
        // 入力
        long a = sc.nextInt();
      	long b = sc.nextInt();
      	long c = sc.nextInt();
      	long d = sc.nextInt();
      	long max=0;

		if((b<0&&c>0)||(a>0&&d<0)){
          max=Math.max(b*c,a*d);
        }else{
          max=Math.max(a*c,b*d);
        }
      System.out.println(max);

    }
}