import java.util.*;
public class Main {

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

    long a;
    long b;
    long c;
    long d;
    long result;

    private void input() {
        Scanner sc = new Scanner(System.in);
        a = sc.nextLong();
        b = sc.nextLong();
        c = sc.nextLong();
        d = sc.nextLong();
    }

    private void solve() {
        long ac = a*c;
        long ad = a*d;
        long bc = b*c;
        long bd = b*d;
        result = max(max(ac,ad), max(bc,bd));
    }

    private long max(long l1, long l2) {
        if (l1 > l2) {
            return l1;
        } else {
            return l2;
        }
    }

    private void output() {
        System.out.println(result);
        /*
        System.out.println((n==0) ? "Yes" : "No");
        */
    }
} import java.util.*; util.* java public class Main {

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

    long a;
    long b;
    long c;
    long d;
    long result;

    private void input() {
        Scanner sc = new Scanner(System.in);
        a = sc.nextLong();
        b = sc.nextLong();
        c = sc.nextLong();
        d = sc.nextLong();
    }

    private void solve() {
        long ac = a*c;
        long ad = a*d;
        long bc = b*c;
        long bd = b*d;
        result = max(max(ac,ad), max(bc,bd));
    }

    private long max(long l1, long l2) {
        if (l1 > l2) {
            return l1;
        } else {
            return l2;
        }
    }

    private void output() {
        System.out.println(result);
        /*
        System.out.println((n==0) ? "Yes" : "No");
        */
    }
} Main long a; a long b; b long c; c long d; d long result; result public static void main(String[] args){
        Main main = new Main();
        main.input();
        main.solve();
        main.output();
    } main {
        Main main = new Main();
        main.input();
        main.solve();
        main.output();
    } Main main = new Main(); main new Main() main.input() main.input main main.solve() main.solve main main.output() main.output main String[] args args private void input() {
        Scanner sc = new Scanner(System.in);
        a = sc.nextLong();
        b = sc.nextLong();
        c = sc.nextLong();
        d = sc.nextLong();
    } input {
        Scanner sc = new Scanner(System.in);
        a = sc.nextLong();
        b = sc.nextLong();
        c = sc.nextLong();
        d = sc.nextLong();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) a = sc.nextLong() a sc.nextLong() sc.nextLong sc b = sc.nextLong() b sc.nextLong() sc.nextLong sc c = sc.nextLong() c sc.nextLong() sc.nextLong sc d = sc.nextLong() d sc.nextLong() sc.nextLong sc private void solve() {
        long ac = a*c;
        long ad = a*d;
        long bc = b*c;
        long bd = b*d;
        result = max(max(ac,ad), max(bc,bd));
    } solve {
        long ac = a*c;
        long ad = a*d;
        long bc = b*c;
        long bd = b*d;
        result = max(max(ac,ad), max(bc,bd));
    } long ac = a*c; ac a*c a c long ad = a*d; ad a*d a d long bc = b*c; bc b*c b c long bd = b*d; bd b*d b d result = max(max(ac,ad), max(bc,bd)) result max(max(ac,ad), max(bc,bd)) max max(ac,ad) max ac ad max(bc,bd) max bc bd private long max(long l1, long l2) {
        if (l1 > l2) {
            return l1;
        } else {
            return l2;
        }
    } max {
        if (l1 > l2) {
            return l1;
        } else {
            return l2;
        }
    } if (l1 > l2) {
            return l1;
        } else {
            return l2;
        } l1 > l2 l1 l2 {
            return l1;
        } return l1; l1 {
            return l2;
        } return l2; l2 long l1 l1 long l2 l2 private void output() {
        System.out.println(result);
        /*
        System.out.println((n==0) ? "Yes" : "No");
        */
    } output {
        System.out.println(result);
        /*
        System.out.println((n==0) ? "Yes" : "No");
        */
    } System.out.println(result) System.out.println System.out System System.out result public class Main {

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

    long a;
    long b;
    long c;
    long d;
    long result;

    private void input() {
        Scanner sc = new Scanner(System.in);
        a = sc.nextLong();
        b = sc.nextLong();
        c = sc.nextLong();
        d = sc.nextLong();
    }

    private void solve() {
        long ac = a*c;
        long ad = a*d;
        long bc = b*c;
        long bd = b*d;
        result = max(max(ac,ad), max(bc,bd));
    }

    private long max(long l1, long l2) {
        if (l1 > l2) {
            return l1;
        } else {
            return l2;
        }
    }

    private void output() {
        System.out.println(result);
        /*
        System.out.println((n==0) ? "Yes" : "No");
        */
    }
} public class Main {

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

    long a;
    long b;
    long c;
    long d;
    long result;

    private void input() {
        Scanner sc = new Scanner(System.in);
        a = sc.nextLong();
        b = sc.nextLong();
        c = sc.nextLong();
        d = sc.nextLong();
    }

    private void solve() {
        long ac = a*c;
        long ad = a*d;
        long bc = b*c;
        long bd = b*d;
        result = max(max(ac,ad), max(bc,bd));
    }

    private long max(long l1, long l2) {
        if (l1 > l2) {
            return l1;
        } else {
            return l2;
        }
    }

    private void output() {
        System.out.println(result);
        /*
        System.out.println((n==0) ? "Yes" : "No");
        */
    }
} Main
import java.util.*;
public class Main {

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

    long a;
    long b;
    long c;
    long d;
    long result;

    private void input() {
        Scanner sc = new Scanner(System.in);
        a = sc.nextLong();
        b = sc.nextLong();
        c = sc.nextLong();
        d = sc.nextLong();
    }

    private void solve() {
        long ac = a*c;
        long ad = a*d;
        long bc = b*c;
        long bd = b*d;
        result = max(max(ac,ad), max(bc,bd));
    }

    private long max(long l1, long l2) {
        if (l1 > l2) {
            return l1;
        } else {
            return l2;
        }
    }

    private void output() {
        System.out.println(result);
        /*
        System.out.println((n==0) ? "Yes" : "No");
        */
    }
}
