import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
    	Scanner sn = new Scanner(System.in);
        Long a = sn.nextLong();
      	Long b = sn.nextLong();
      	Long c = sn.nextLong();
      	Long d = sn.nextLong();
        Long max1 = (Long) a * c; 
      	Long max2 = (Long) a * d;
      	Long max3 = (Long) b * c;
      	Long max4 = (Long) b * d;
      	Long max11 = Math.max(max1, max2);
      	Long max22 = Math.max(max3, max4);
      	System.out.println(Math.max(max11, max22));
    }
}
  import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
    	Scanner sn = new Scanner(System.in);
        Long a = sn.nextLong();
      	Long b = sn.nextLong();
      	Long c = sn.nextLong();
      	Long d = sn.nextLong();
        Long max1 = (Long) a * c; 
      	Long max2 = (Long) a * d;
      	Long max3 = (Long) b * c;
      	Long max4 = (Long) b * d;
      	Long max11 = Math.max(max1, max2);
      	Long max22 = Math.max(max3, max4);
      	System.out.println(Math.max(max11, max22));
    }
} Main public static void main(String[] args) {
    	Scanner sn = new Scanner(System.in);
        Long a = sn.nextLong();
      	Long b = sn.nextLong();
      	Long c = sn.nextLong();
      	Long d = sn.nextLong();
        Long max1 = (Long) a * c; 
      	Long max2 = (Long) a * d;
      	Long max3 = (Long) b * c;
      	Long max4 = (Long) b * d;
      	Long max11 = Math.max(max1, max2);
      	Long max22 = Math.max(max3, max4);
      	System.out.println(Math.max(max11, max22));
    } main {
    	Scanner sn = new Scanner(System.in);
        Long a = sn.nextLong();
      	Long b = sn.nextLong();
      	Long c = sn.nextLong();
      	Long d = sn.nextLong();
        Long max1 = (Long) a * c; 
      	Long max2 = (Long) a * d;
      	Long max3 = (Long) b * c;
      	Long max4 = (Long) b * d;
      	Long max11 = Math.max(max1, max2);
      	Long max22 = Math.max(max3, max4);
      	System.out.println(Math.max(max11, max22));
    } Scanner sn = new Scanner(System.in); sn new Scanner(System.in) Long a = sn.nextLong(); a sn.nextLong() sn.nextLong sn Long b = sn.nextLong(); b sn.nextLong() sn.nextLong sn Long c = sn.nextLong(); c sn.nextLong() sn.nextLong sn Long d = sn.nextLong(); d sn.nextLong() sn.nextLong sn Long max1 = (Long) a * c; max1 (Long) a * c (Long) a c Long max2 = (Long) a * d; max2 (Long) a * d (Long) a d Long max3 = (Long) b * c; max3 (Long) b * c (Long) b c Long max4 = (Long) b * d; max4 (Long) b * d (Long) b d Long max11 = Math.max(max1, max2); max11 Math.max(max1, max2) Math.max Math max1 max2 Long max22 = Math.max(max3, max4); max22 Math.max(max3, max4) Math.max Math max3 max4 System.out.println(Math.max(max11, max22)) System.out.println System.out System System.out Math.max(max11, max22) Math.max Math max11 max22 String[] args args public class Main {

	public static void main(String[] args) {
    	Scanner sn = new Scanner(System.in);
        Long a = sn.nextLong();
      	Long b = sn.nextLong();
      	Long c = sn.nextLong();
      	Long d = sn.nextLong();
        Long max1 = (Long) a * c; 
      	Long max2 = (Long) a * d;
      	Long max3 = (Long) b * c;
      	Long max4 = (Long) b * d;
      	Long max11 = Math.max(max1, max2);
      	Long max22 = Math.max(max3, max4);
      	System.out.println(Math.max(max11, max22));
    }
} public class Main {

	public static void main(String[] args) {
    	Scanner sn = new Scanner(System.in);
        Long a = sn.nextLong();
      	Long b = sn.nextLong();
      	Long c = sn.nextLong();
      	Long d = sn.nextLong();
        Long max1 = (Long) a * c; 
      	Long max2 = (Long) a * d;
      	Long max3 = (Long) b * c;
      	Long max4 = (Long) b * d;
      	Long max11 = Math.max(max1, max2);
      	Long max22 = Math.max(max3, max4);
      	System.out.println(Math.max(max11, max22));
    }
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
    	Scanner sn = new Scanner(System.in);
        Long a = sn.nextLong();
      	Long b = sn.nextLong();
      	Long c = sn.nextLong();
      	Long d = sn.nextLong();
        Long max1 = (Long) a * c; 
      	Long max2 = (Long) a * d;
      	Long max3 = (Long) b * c;
      	Long max4 = (Long) b * d;
      	Long max11 = Math.max(max1, max2);
      	Long max22 = Math.max(max3, max4);
      	System.out.println(Math.max(max11, max22));
    }
}
 