import java.util.*;
import java.lang.*;
import java.io.*;

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();
      long product=0;
      long product1=a*c;
      long product2=a*d;
      long product3=b*c;
      long product4=b*d;
      product=Math.max(product1,(Math.max(product2,Math.max(product3,product4))));
      System.out.println(product);
	}
} import java.util.*; util.* java import java.lang.*; lang.* java import java.io.*; io.* java 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();
      long product=0;
      long product1=a*c;
      long product2=a*d;
      long product3=b*c;
      long product4=b*d;
      product=Math.max(product1,(Math.max(product2,Math.max(product3,product4))));
      System.out.println(product);
	}
} 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();
      long product=0;
      long product1=a*c;
      long product2=a*d;
      long product3=b*c;
      long product4=b*d;
      product=Math.max(product1,(Math.max(product2,Math.max(product3,product4))));
      System.out.println(product);
	} main {
	  Scanner sc=new Scanner(System.in);
      long a=sc.nextLong();
      long b=sc.nextLong();
      long c=sc.nextLong();
      long d=sc.nextLong();
      long product=0;
      long product1=a*c;
      long product2=a*d;
      long product3=b*c;
      long product4=b*d;
      product=Math.max(product1,(Math.max(product2,Math.max(product3,product4))));
      System.out.println(product);
	} 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 long product=0; product 0 long product1=a*c; product1 a*c a c long product2=a*d; product2 a*d a d long product3=b*c; product3 b*c b c long product4=b*d; product4 b*d b d product=Math.max(product1,(Math.max(product2,Math.max(product3,product4)))) product Math.max(product1,(Math.max(product2,Math.max(product3,product4)))) Math.max Math product1 (Math.max(product2,Math.max(product3,product4))) Math.max Math product2 Math.max(product3,product4) Math.max Math product3 product4 System.out.println(product) System.out.println System.out System System.out product String[] args args
import java.util.*;
import java.lang.*;
import java.io.*;

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();
      long product=0;
      long product1=a*c;
      long product2=a*d;
      long product3=b*c;
      long product4=b*d;
      product=Math.max(product1,(Math.max(product2,Math.max(product3,product4))));
      System.out.println(product);
	}
}