


import java.util.Scanner;
public class Main {
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        long a=scan.nextLong();
        long b=scan.nextLong();
        long c=scan.nextLong();
        long d=scan.nextLong();
        long ans1=a*c;
        long ans2=b*d;
        long ans4=b*c;
        long ans3=a*d;
        System.out.print(Math.max(Math.max(ans1,ans3),Math.max(ans2,ans4)));
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        long a=scan.nextLong();
        long b=scan.nextLong();
        long c=scan.nextLong();
        long d=scan.nextLong();
        long ans1=a*c;
        long ans2=b*d;
        long ans4=b*c;
        long ans3=a*d;
        System.out.print(Math.max(Math.max(ans1,ans3),Math.max(ans2,ans4)));
    }
} Main public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        long a=scan.nextLong();
        long b=scan.nextLong();
        long c=scan.nextLong();
        long d=scan.nextLong();
        long ans1=a*c;
        long ans2=b*d;
        long ans4=b*c;
        long ans3=a*d;
        System.out.print(Math.max(Math.max(ans1,ans3),Math.max(ans2,ans4)));
    } main {
        Scanner scan = new Scanner(System.in);
        long a=scan.nextLong();
        long b=scan.nextLong();
        long c=scan.nextLong();
        long d=scan.nextLong();
        long ans1=a*c;
        long ans2=b*d;
        long ans4=b*c;
        long ans3=a*d;
        System.out.print(Math.max(Math.max(ans1,ans3),Math.max(ans2,ans4)));
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) long a=scan.nextLong(); a scan.nextLong() scan.nextLong scan long b=scan.nextLong(); b scan.nextLong() scan.nextLong scan long c=scan.nextLong(); c scan.nextLong() scan.nextLong scan long d=scan.nextLong(); d scan.nextLong() scan.nextLong scan long ans1=a*c; ans1 a*c a c long ans2=b*d; ans2 b*d b d long ans4=b*c; ans4 b*c b c long ans3=a*d; ans3 a*d a d System.out.print(Math.max(Math.max(ans1,ans3),Math.max(ans2,ans4))) System.out.print System.out System System.out Math.max(Math.max(ans1,ans3),Math.max(ans2,ans4)) Math.max Math Math.max(ans1,ans3) Math.max Math ans1 ans3 Math.max(ans2,ans4) Math.max Math ans2 ans4 String[] args args public class Main {
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        long a=scan.nextLong();
        long b=scan.nextLong();
        long c=scan.nextLong();
        long d=scan.nextLong();
        long ans1=a*c;
        long ans2=b*d;
        long ans4=b*c;
        long ans3=a*d;
        System.out.print(Math.max(Math.max(ans1,ans3),Math.max(ans2,ans4)));
    }
} public class Main {
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        long a=scan.nextLong();
        long b=scan.nextLong();
        long c=scan.nextLong();
        long d=scan.nextLong();
        long ans1=a*c;
        long ans2=b*d;
        long ans4=b*c;
        long ans3=a*d;
        System.out.print(Math.max(Math.max(ans1,ans3),Math.max(ans2,ans4)));
    }
} Main



import java.util.Scanner;
public class Main {
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        long a=scan.nextLong();
        long b=scan.nextLong();
        long c=scan.nextLong();
        long d=scan.nextLong();
        long ans1=a*c;
        long ans2=b*d;
        long ans4=b*c;
        long ans3=a*d;
        System.out.print(Math.max(Math.max(ans1,ans3),Math.max(ans2,ans4)));
    }
}
