import java.io.PrintWriter;
import java.util.Scanner;

public class Main {

    void solve(Scanner in, PrintWriter out) {
        long a = in.nextInt();
        long b = in.nextInt();
        long c = in.nextInt();
        long d = in.nextInt();
        out.println(Math.max(a * c, Math.max(a * d, Math.max(b * c, b * d))));
    }

    public static void main(String[] args) {
        try(Scanner in = new Scanner(System.in);
            PrintWriter out = new PrintWriter(System.out)) {
            new Main().solve(in, out);
        }
    }
} import java.io.PrintWriter; PrintWriter java.io import java.util.Scanner; Scanner java.util public class Main {

    void solve(Scanner in, PrintWriter out) {
        long a = in.nextInt();
        long b = in.nextInt();
        long c = in.nextInt();
        long d = in.nextInt();
        out.println(Math.max(a * c, Math.max(a * d, Math.max(b * c, b * d))));
    }

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

    void solve(Scanner in, PrintWriter out) {
        long a = in.nextInt();
        long b = in.nextInt();
        long c = in.nextInt();
        long d = in.nextInt();
        out.println(Math.max(a * c, Math.max(a * d, Math.max(b * c, b * d))));
    }

    public static void main(String[] args) {
        try(Scanner in = new Scanner(System.in);
            PrintWriter out = new PrintWriter(System.out)) {
            new Main().solve(in, out);
        }
    }
} public class Main {

    void solve(Scanner in, PrintWriter out) {
        long a = in.nextInt();
        long b = in.nextInt();
        long c = in.nextInt();
        long d = in.nextInt();
        out.println(Math.max(a * c, Math.max(a * d, Math.max(b * c, b * d))));
    }

    public static void main(String[] args) {
        try(Scanner in = new Scanner(System.in);
            PrintWriter out = new PrintWriter(System.out)) {
            new Main().solve(in, out);
        }
    }
} Main
import java.io.PrintWriter;
import java.util.Scanner;

public class Main {

    void solve(Scanner in, PrintWriter out) {
        long a = in.nextInt();
        long b = in.nextInt();
        long c = in.nextInt();
        long d = in.nextInt();
        out.println(Math.max(a * c, Math.max(a * d, Math.max(b * c, b * d))));
    }

    public static void main(String[] args) {
        try(Scanner in = new Scanner(System.in);
            PrintWriter out = new PrintWriter(System.out)) {
            new Main().solve(in, out);
        }
    }
}
