import java.util.*;

public 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();
        
        if(a>=0){
            if(d>=0){
                System.out.println(b*d);
            }else{
                System.out.println(d*a);
            }
        }else if(b<0){
            if(c>=0){
                System.out.println(b*c);
            }else{
                System.out.println(c*a);
            }
        }else{
            if(d<0){
                System.out.println(c*a);
            }else if(c>=0){
                System.out.println(b*d);
            }else{
                if(a*c>b*d){
                    System.out.println(a*c);
                }else{
                    System.out.println(b*d);
                }
            }
        }
}
} import java.util.*; util.* java public 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();
        
        if(a>=0){
            if(d>=0){
                System.out.println(b*d);
            }else{
                System.out.println(d*a);
            }
        }else if(b<0){
            if(c>=0){
                System.out.println(b*c);
            }else{
                System.out.println(c*a);
            }
        }else{
            if(d<0){
                System.out.println(c*a);
            }else if(c>=0){
                System.out.println(b*d);
            }else{
                if(a*c>b*d){
                    System.out.println(a*c);
                }else{
                    System.out.println(b*d);
                }
            }
        }
}
} 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();
        
        if(a>=0){
            if(d>=0){
                System.out.println(b*d);
            }else{
                System.out.println(d*a);
            }
        }else if(b<0){
            if(c>=0){
                System.out.println(b*c);
            }else{
                System.out.println(c*a);
            }
        }else{
            if(d<0){
                System.out.println(c*a);
            }else if(c>=0){
                System.out.println(b*d);
            }else{
                if(a*c>b*d){
                    System.out.println(a*c);
                }else{
                    System.out.println(b*d);
                }
            }
        }
} main {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long d = sc.nextLong();
        
        if(a>=0){
            if(d>=0){
                System.out.println(b*d);
            }else{
                System.out.println(d*a);
            }
        }else if(b<0){
            if(c>=0){
                System.out.println(b*c);
            }else{
                System.out.println(c*a);
            }
        }else{
            if(d<0){
                System.out.println(c*a);
            }else if(c>=0){
                System.out.println(b*d);
            }else{
                if(a*c>b*d){
                    System.out.println(a*c);
                }else{
                    System.out.println(b*d);
                }
            }
        }
} 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 if(a>=0){
            if(d>=0){
                System.out.println(b*d);
            }else{
                System.out.println(d*a);
            }
        }else if(b<0){
            if(c>=0){
                System.out.println(b*c);
            }else{
                System.out.println(c*a);
            }
        }else{
            if(d<0){
                System.out.println(c*a);
            }else if(c>=0){
                System.out.println(b*d);
            }else{
                if(a*c>b*d){
                    System.out.println(a*c);
                }else{
                    System.out.println(b*d);
                }
            }
        } a>=0 a 0 {
            if(d>=0){
                System.out.println(b*d);
            }else{
                System.out.println(d*a);
            }
        } if(d>=0){
                System.out.println(b*d);
            }else{
                System.out.println(d*a);
            } d>=0 d 0 {
                System.out.println(b*d);
            } System.out.println(b*d) System.out.println System.out System System.out b*d b d {
                System.out.println(d*a);
            } System.out.println(d*a) System.out.println System.out System System.out d*a d a if(b<0){
            if(c>=0){
                System.out.println(b*c);
            }else{
                System.out.println(c*a);
            }
        }else{
            if(d<0){
                System.out.println(c*a);
            }else if(c>=0){
                System.out.println(b*d);
            }else{
                if(a*c>b*d){
                    System.out.println(a*c);
                }else{
                    System.out.println(b*d);
                }
            }
        } b<0 b 0 {
            if(c>=0){
                System.out.println(b*c);
            }else{
                System.out.println(c*a);
            }
        } if(c>=0){
                System.out.println(b*c);
            }else{
                System.out.println(c*a);
            } c>=0 c 0 {
                System.out.println(b*c);
            } System.out.println(b*c) System.out.println System.out System System.out b*c b c {
                System.out.println(c*a);
            } System.out.println(c*a) System.out.println System.out System System.out c*a c a {
            if(d<0){
                System.out.println(c*a);
            }else if(c>=0){
                System.out.println(b*d);
            }else{
                if(a*c>b*d){
                    System.out.println(a*c);
                }else{
                    System.out.println(b*d);
                }
            }
        } if(d<0){
                System.out.println(c*a);
            }else if(c>=0){
                System.out.println(b*d);
            }else{
                if(a*c>b*d){
                    System.out.println(a*c);
                }else{
                    System.out.println(b*d);
                }
            } d<0 d 0 {
                System.out.println(c*a);
            } System.out.println(c*a) System.out.println System.out System System.out c*a c a if(c>=0){
                System.out.println(b*d);
            }else{
                if(a*c>b*d){
                    System.out.println(a*c);
                }else{
                    System.out.println(b*d);
                }
            } c>=0 c 0 {
                System.out.println(b*d);
            } System.out.println(b*d) System.out.println System.out System System.out b*d b d {
                if(a*c>b*d){
                    System.out.println(a*c);
                }else{
                    System.out.println(b*d);
                }
            } if(a*c>b*d){
                    System.out.println(a*c);
                }else{
                    System.out.println(b*d);
                } a*c>b*d a*c a c b*d b d {
                    System.out.println(a*c);
                } System.out.println(a*c) System.out.println System.out System System.out a*c a c {
                    System.out.println(b*d);
                } System.out.println(b*d) System.out.println System.out System System.out b*d b d String[] args args public 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();
        
        if(a>=0){
            if(d>=0){
                System.out.println(b*d);
            }else{
                System.out.println(d*a);
            }
        }else if(b<0){
            if(c>=0){
                System.out.println(b*c);
            }else{
                System.out.println(c*a);
            }
        }else{
            if(d<0){
                System.out.println(c*a);
            }else if(c>=0){
                System.out.println(b*d);
            }else{
                if(a*c>b*d){
                    System.out.println(a*c);
                }else{
                    System.out.println(b*d);
                }
            }
        }
}
} public 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();
        
        if(a>=0){
            if(d>=0){
                System.out.println(b*d);
            }else{
                System.out.println(d*a);
            }
        }else if(b<0){
            if(c>=0){
                System.out.println(b*c);
            }else{
                System.out.println(c*a);
            }
        }else{
            if(d<0){
                System.out.println(c*a);
            }else if(c>=0){
                System.out.println(b*d);
            }else{
                if(a*c>b*d){
                    System.out.println(a*c);
                }else{
                    System.out.println(b*d);
                }
            }
        }
}
} Main
import java.util.*;

public 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();
        
        if(a>=0){
            if(d>=0){
                System.out.println(b*d);
            }else{
                System.out.println(d*a);
            }
        }else if(b<0){
            if(c>=0){
                System.out.println(b*c);
            }else{
                System.out.println(c*a);
            }
        }else{
            if(d<0){
                System.out.println(c*a);
            }else if(c>=0){
                System.out.println(b*d);
            }else{
                if(a*c>b*d){
                    System.out.println(a*c);
                }else{
                    System.out.println(b*d);
                }
            }
        }
}
}
