import java.util.*;

public class Main{
    void solve(){
        Scanner scan = new Scanner(System.in);
        long a = scan.nextInt();
        long b = scan.nextInt();
        long c = scan.nextInt();
        long d = scan.nextInt();
        long out = a * c;
        out = Math.max(out, a * d);
        out = Math.max(out, b * c);
        out = Math.max(out, b * d);
        System.out.println(out);
    }

    public static void main(String[] args){
        new Main().solve();
    }
} import java.util.*; util.* java public class Main{
    void solve(){
        Scanner scan = new Scanner(System.in);
        long a = scan.nextInt();
        long b = scan.nextInt();
        long c = scan.nextInt();
        long d = scan.nextInt();
        long out = a * c;
        out = Math.max(out, a * d);
        out = Math.max(out, b * c);
        out = Math.max(out, b * d);
        System.out.println(out);
    }

    public static void main(String[] args){
        new Main().solve();
    }
} Main void solve(){
        Scanner scan = new Scanner(System.in);
        long a = scan.nextInt();
        long b = scan.nextInt();
        long c = scan.nextInt();
        long d = scan.nextInt();
        long out = a * c;
        out = Math.max(out, a * d);
        out = Math.max(out, b * c);
        out = Math.max(out, b * d);
        System.out.println(out);
    } solve {
        Scanner scan = new Scanner(System.in);
        long a = scan.nextInt();
        long b = scan.nextInt();
        long c = scan.nextInt();
        long d = scan.nextInt();
        long out = a * c;
        out = Math.max(out, a * d);
        out = Math.max(out, b * c);
        out = Math.max(out, b * d);
        System.out.println(out);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) long a = scan.nextInt(); a scan.nextInt() scan.nextInt scan long b = scan.nextInt(); b scan.nextInt() scan.nextInt scan long c = scan.nextInt(); c scan.nextInt() scan.nextInt scan long d = scan.nextInt(); d scan.nextInt() scan.nextInt scan long out = a * c; out a * c a c out = Math.max(out, a * d) out Math.max(out, a * d) Math.max Math out a * d a d out = Math.max(out, b * c) out Math.max(out, b * c) Math.max Math out b * c b c out = Math.max(out, b * d) out Math.max(out, b * d) Math.max Math out b * d b d System.out.println(out) System.out.println System.out System System.out out public static void main(String[] args){
        new Main().solve();
    } main {
        new Main().solve();
    } new Main().solve() new Main().solve new Main() String[] args args public class Main{
    void solve(){
        Scanner scan = new Scanner(System.in);
        long a = scan.nextInt();
        long b = scan.nextInt();
        long c = scan.nextInt();
        long d = scan.nextInt();
        long out = a * c;
        out = Math.max(out, a * d);
        out = Math.max(out, b * c);
        out = Math.max(out, b * d);
        System.out.println(out);
    }

    public static void main(String[] args){
        new Main().solve();
    }
} public class Main{
    void solve(){
        Scanner scan = new Scanner(System.in);
        long a = scan.nextInt();
        long b = scan.nextInt();
        long c = scan.nextInt();
        long d = scan.nextInt();
        long out = a * c;
        out = Math.max(out, a * d);
        out = Math.max(out, b * c);
        out = Math.max(out, b * d);
        System.out.println(out);
    }

    public static void main(String[] args){
        new Main().solve();
    }
} Main
import java.util.*;

public class Main{
    void solve(){
        Scanner scan = new Scanner(System.in);
        long a = scan.nextInt();
        long b = scan.nextInt();
        long c = scan.nextInt();
        long d = scan.nextInt();
        long out = a * c;
        out = Math.max(out, a * d);
        out = Math.max(out, b * c);
        out = Math.max(out, b * d);
        System.out.println(out);
    }

    public static void main(String[] args){
        new Main().solve();
    }
}
