import java.util.*;
    public class Main{
    	public static void main(String[] args){
        	Scanner s  = new Scanner(System.in);
          	long a = s.nextLong();
          	long b = s.nextLong();
          	long c = s.nextLong();
          	long d = s.nextLong();
          	//long res=  1;
            long a1 = a*c;
            long a2 = b*d;
            long a3 = a*d;
          	long a4 = b*c;
          	long res1 = Math.max(a1,a2);
          	long res2 = Math.max(a3,a4);
          	long res = Math.max(res1,res2);
          	System.out.println(res);
        }
    } import java.util.*; util.* java public class Main{
    	public static void main(String[] args){
        	Scanner s  = new Scanner(System.in);
          	long a = s.nextLong();
          	long b = s.nextLong();
          	long c = s.nextLong();
          	long d = s.nextLong();
          	//long res=  1;
            long a1 = a*c;
            long a2 = b*d;
            long a3 = a*d;
          	long a4 = b*c;
          	long res1 = Math.max(a1,a2);
          	long res2 = Math.max(a3,a4);
          	long res = Math.max(res1,res2);
          	System.out.println(res);
        }
    } Main public static void main(String[] args){
        	Scanner s  = new Scanner(System.in);
          	long a = s.nextLong();
          	long b = s.nextLong();
          	long c = s.nextLong();
          	long d = s.nextLong();
          	//long res=  1;
            long a1 = a*c;
            long a2 = b*d;
            long a3 = a*d;
          	long a4 = b*c;
          	long res1 = Math.max(a1,a2);
          	long res2 = Math.max(a3,a4);
          	long res = Math.max(res1,res2);
          	System.out.println(res);
        } main {
        	Scanner s  = new Scanner(System.in);
          	long a = s.nextLong();
          	long b = s.nextLong();
          	long c = s.nextLong();
          	long d = s.nextLong();
          	//long res=  1;
            long a1 = a*c;
            long a2 = b*d;
            long a3 = a*d;
          	long a4 = b*c;
          	long res1 = Math.max(a1,a2);
          	long res2 = Math.max(a3,a4);
          	long res = Math.max(res1,res2);
          	System.out.println(res);
        } Scanner s  = new Scanner(System.in); s new Scanner(System.in) long a = s.nextLong(); a s.nextLong() s.nextLong s long b = s.nextLong(); b s.nextLong() s.nextLong s long c = s.nextLong(); c s.nextLong() s.nextLong s long d = s.nextLong(); d s.nextLong() s.nextLong s long a1 = a*c; a1 a*c a c long a2 = b*d; a2 b*d b d long a3 = a*d; a3 a*d a d long a4 = b*c; a4 b*c b c long res1 = Math.max(a1,a2); res1 Math.max(a1,a2) Math.max Math a1 a2 long res2 = Math.max(a3,a4); res2 Math.max(a3,a4) Math.max Math a3 a4 long res = Math.max(res1,res2); res Math.max(res1,res2) Math.max Math res1 res2 System.out.println(res) System.out.println System.out System System.out res String[] args args public class Main{
    	public static void main(String[] args){
        	Scanner s  = new Scanner(System.in);
          	long a = s.nextLong();
          	long b = s.nextLong();
          	long c = s.nextLong();
          	long d = s.nextLong();
          	//long res=  1;
            long a1 = a*c;
            long a2 = b*d;
            long a3 = a*d;
          	long a4 = b*c;
          	long res1 = Math.max(a1,a2);
          	long res2 = Math.max(a3,a4);
          	long res = Math.max(res1,res2);
          	System.out.println(res);
        }
    } public class Main{
    	public static void main(String[] args){
        	Scanner s  = new Scanner(System.in);
          	long a = s.nextLong();
          	long b = s.nextLong();
          	long c = s.nextLong();
          	long d = s.nextLong();
          	//long res=  1;
            long a1 = a*c;
            long a2 = b*d;
            long a3 = a*d;
          	long a4 = b*c;
          	long res1 = Math.max(a1,a2);
          	long res2 = Math.max(a3,a4);
          	long res = Math.max(res1,res2);
          	System.out.println(res);
        }
    } Main
import java.util.*;
    public class Main{
    	public static void main(String[] args){
        	Scanner s  = new Scanner(System.in);
          	long a = s.nextLong();
          	long b = s.nextLong();
          	long c = s.nextLong();
          	long d = s.nextLong();
          	//long res=  1;
            long a1 = a*c;
            long a2 = b*d;
            long a3 = a*d;
          	long a4 = b*c;
          	long res1 = Math.max(a1,a2);
          	long res2 = Math.max(a3,a4);
          	long res = Math.max(res1,res2);
          	System.out.println(res);
        }
    }