import java.util.*;
public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        long a = sc.nextInt();
        long b = sc.nextInt();
        long c = sc.nextInt();
        long d = sc.nextInt();
        //最大値を格納する変数ans
        long ans = a * c;
        if(a * d > ans){
            ans = a * d;
        }
        if(b * c > ans){
            ans = b * c;
        }
        if(b * d > ans){
            ans = b * d;
        }
        //ansを出力する
        System.out.println(ans);
    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        long a = sc.nextInt();
        long b = sc.nextInt();
        long c = sc.nextInt();
        long d = sc.nextInt();
        //最大値を格納する変数ans
        long ans = a * c;
        if(a * d > ans){
            ans = a * d;
        }
        if(b * c > ans){
            ans = b * c;
        }
        if(b * d > ans){
            ans = b * d;
        }
        //ansを出力する
        System.out.println(ans);
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        long a = sc.nextInt();
        long b = sc.nextInt();
        long c = sc.nextInt();
        long d = sc.nextInt();
        //最大値を格納する変数ans
        long ans = a * c;
        if(a * d > ans){
            ans = a * d;
        }
        if(b * c > ans){
            ans = b * c;
        }
        if(b * d > ans){
            ans = b * d;
        }
        //ansを出力する
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextInt();
        long b = sc.nextInt();
        long c = sc.nextInt();
        long d = sc.nextInt();
        //最大値を格納する変数ans
        long ans = a * c;
        if(a * d > ans){
            ans = a * d;
        }
        if(b * c > ans){
            ans = b * c;
        }
        if(b * d > ans){
            ans = b * d;
        }
        //ansを出力する
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long a = sc.nextInt(); a sc.nextInt() sc.nextInt sc long b = sc.nextInt(); b sc.nextInt() sc.nextInt sc long c = sc.nextInt(); c sc.nextInt() sc.nextInt sc long d = sc.nextInt(); d sc.nextInt() sc.nextInt sc long ans = a * c; ans a * c a c if(a * d > ans){
            ans = a * d;
        } a * d > ans a * d a d ans {
            ans = a * d;
        } ans = a * d ans a * d a d if(b * c > ans){
            ans = b * c;
        } b * c > ans b * c b c ans {
            ans = b * c;
        } ans = b * c ans b * c b c if(b * d > ans){
            ans = b * d;
        } b * d > ans b * d b d ans {
            ans = b * d;
        } ans = b * d ans b * d b d System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        long a = sc.nextInt();
        long b = sc.nextInt();
        long c = sc.nextInt();
        long d = sc.nextInt();
        //最大値を格納する変数ans
        long ans = a * c;
        if(a * d > ans){
            ans = a * d;
        }
        if(b * c > ans){
            ans = b * c;
        }
        if(b * d > ans){
            ans = b * d;
        }
        //ansを出力する
        System.out.println(ans);
    }
} public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        long a = sc.nextInt();
        long b = sc.nextInt();
        long c = sc.nextInt();
        long d = sc.nextInt();
        //最大値を格納する変数ans
        long ans = a * c;
        if(a * d > ans){
            ans = a * d;
        }
        if(b * c > ans){
            ans = b * c;
        }
        if(b * d > ans){
            ans = b * d;
        }
        //ansを出力する
        System.out.println(ans);
    }
} Main
import java.util.*;
public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        long a = sc.nextInt();
        long b = sc.nextInt();
        long c = sc.nextInt();
        long d = sc.nextInt();
        //最大値を格納する変数ans
        long ans = a * c;
        if(a * d > ans){
            ans = a * d;
        }
        if(b * c > ans){
            ans = b * c;
        }
        if(b * d > ans){
            ans = b * d;
        }
        //ansを出力する
        System.out.println(ans);
    }
}