
import java.io.PrintWriter;
import java.util.*;

public class Main {
    void run() {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long d = sc.nextLong();

        long[] arr = {a * c, a * d,b * c, b *d};

        long max = Long.MIN_VALUE;
        for (long l : arr) {
            max = Math.max(max, l);
        }

        System.out.println(max);

        // out.println("Hello World");
        out.flush();    }

    void debug(Object... os) {
        System.err.println(Arrays.deepToString(os));
    }

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

        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long d = sc.nextLong();

        long[] arr = {a * c, a * d,b * c, b *d};

        long max = Long.MIN_VALUE;
        for (long l : arr) {
            max = Math.max(max, l);
        }

        System.out.println(max);

        // out.println("Hello World");
        out.flush();    }

    void debug(Object... os) {
        System.err.println(Arrays.deepToString(os));
    }

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

        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long d = sc.nextLong();

        long[] arr = {a * c, a * d,b * c, b *d};

        long max = Long.MIN_VALUE;
        for (long l : arr) {
            max = Math.max(max, l);
        }

        System.out.println(max);

        // out.println("Hello World");
        out.flush();    } run {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long d = sc.nextLong();

        long[] arr = {a * c, a * d,b * c, b *d};

        long max = Long.MIN_VALUE;
        for (long l : arr) {
            max = Math.max(max, l);
        }

        System.out.println(max);

        // out.println("Hello World");
        out.flush();    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) 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 long[] arr = {a * c, a * d,b * c, b *d}; arr {a * c, a * d,b * c, b *d} a * c a c a * d a d b * c b c b *d b d long max = Long.MIN_VALUE; max Long.MIN_VALUE Long Long.MIN_VALUE for (long l : arr) {
            max = Math.max(max, l);
        } long l arr {
            max = Math.max(max, l);
        } {
            max = Math.max(max, l);
        } max = Math.max(max, l) max Math.max(max, l) Math.max Math max l System.out.println(max) System.out.println System.out System System.out max out.flush() out.flush out void debug(Object... os) {
        System.err.println(Arrays.deepToString(os));
    } debug {
        System.err.println(Arrays.deepToString(os));
    } System.err.println(Arrays.deepToString(os)) System.err.println System.err System System.err Arrays.deepToString(os) Arrays.deepToString Arrays os Object... os os public static void main(String[] args) {
        new Main().run();
    } main {
        new Main().run();
    } new Main().run() new Main().run new Main() String[] args args public class Main {
    void run() {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long d = sc.nextLong();

        long[] arr = {a * c, a * d,b * c, b *d};

        long max = Long.MIN_VALUE;
        for (long l : arr) {
            max = Math.max(max, l);
        }

        System.out.println(max);

        // out.println("Hello World");
        out.flush();    }

    void debug(Object... os) {
        System.err.println(Arrays.deepToString(os));
    }

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

        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long d = sc.nextLong();

        long[] arr = {a * c, a * d,b * c, b *d};

        long max = Long.MIN_VALUE;
        for (long l : arr) {
            max = Math.max(max, l);
        }

        System.out.println(max);

        // out.println("Hello World");
        out.flush();    }

    void debug(Object... os) {
        System.err.println(Arrays.deepToString(os));
    }

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

import java.io.PrintWriter;
import java.util.*;

public class Main {
    void run() {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long d = sc.nextLong();

        long[] arr = {a * c, a * d,b * c, b *d};

        long max = Long.MIN_VALUE;
        for (long l : arr) {
            max = Math.max(max, l);
        }

        System.out.println(max);

        // out.println("Hello World");
        out.flush();    }

    void debug(Object... os) {
        System.err.println(Arrays.deepToString(os));
    }

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