import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        private boolean check(long a, long b) {
            return (a ^ b) >= 0;
        }

        public void solve(int testNumber, InputReader in, OutputWriter out) {
            long a = in.nextLong();
            long b = in.nextLong();
            long c = in.nextLong();
            long d = in.nextLong();
            long left = 0, right = 0;
            //++
            //--
            if (check(a, b)) {
                //++
                if (a >= 0) {
                    if (check(c, d)) {
                        if (c >= 0) {
                            left = Math.max(a, b);
                        } else {
                            left = Math.min(a, b);
                        }
                    } else {
                        left = Math.max(a, b);
                    }
                    right = Math.max(c, d);
                } else if (a < 0) {
                    //--
                    if (check(c, d)) {
                        if (c >= 0) {
                            //--++
                            left = Math.max(a, b);
                        } else {
                            left = Math.min(a, b);
                        }
                    } else {
                        left = Math.min(a, b);
                    }
                    right = Math.min(c, d);
                }
            } else {
                //+-
                if (check(c, d)) {
                    if (c >= 0) {
                        left = Math.max(a, b);
                        right = Math.max(c, d);
                    } else {
                        // +- --
                        left = Math.min(a, b);
                        right = Math.min(c, d);
                    }
                } else {
                    long max_ab = Math.max(a, b);
                    long min_ab = Math.min(a, b);
                    long max_cd = Math.max(c, d);
                    long min_cd = Math.min(c, d);
                    if (max_ab * max_cd > min_cd * min_ab) {
                        left = Math.max(a, b);
                        right = Math.max(c, d);
                    } else {
                        left = Math.min(a, b);
                        right = Math.min(c, d);
                    }
                }
            }
            out.print(left * right);
        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void close() {
            writer.close();
        }

        public void print(long i) {
            writer.print(i);
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}
 import java.io.OutputStream; OutputStream java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.OutputStream; OutputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.io.BufferedWriter; BufferedWriter java.io import java.io.Writer; Writer java.io import java.io.OutputStreamWriter; OutputStreamWriter java.io import java.util.InputMismatchException; InputMismatchException java.util import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        private boolean check(long a, long b) {
            return (a ^ b) >= 0;
        }

        public void solve(int testNumber, InputReader in, OutputWriter out) {
            long a = in.nextLong();
            long b = in.nextLong();
            long c = in.nextLong();
            long d = in.nextLong();
            long left = 0, right = 0;
            //++
            //--
            if (check(a, b)) {
                //++
                if (a >= 0) {
                    if (check(c, d)) {
                        if (c >= 0) {
                            left = Math.max(a, b);
                        } else {
                            left = Math.min(a, b);
                        }
                    } else {
                        left = Math.max(a, b);
                    }
                    right = Math.max(c, d);
                } else if (a < 0) {
                    //--
                    if (check(c, d)) {
                        if (c >= 0) {
                            //--++
                            left = Math.max(a, b);
                        } else {
                            left = Math.min(a, b);
                        }
                    } else {
                        left = Math.min(a, b);
                    }
                    right = Math.min(c, d);
                }
            } else {
                //+-
                if (check(c, d)) {
                    if (c >= 0) {
                        left = Math.max(a, b);
                        right = Math.max(c, d);
                    } else {
                        // +- --
                        left = Math.min(a, b);
                        right = Math.min(c, d);
                    }
                } else {
                    long max_ab = Math.max(a, b);
                    long min_ab = Math.min(a, b);
                    long max_cd = Math.max(c, d);
                    long min_cd = Math.min(c, d);
                    if (max_ab * max_cd > min_cd * min_ab) {
                        left = Math.max(a, b);
                        right = Math.max(c, d);
                    } else {
                        left = Math.min(a, b);
                        right = Math.min(c, d);
                    }
                }
            }
            out.print(left * right);
        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void close() {
            writer.close();
        }

        public void print(long i) {
            writer.print(i);
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out InputReader in = new InputReader(inputStream); in new InputReader(inputStream) OutputWriter out = new OutputWriter(outputStream); out new OutputWriter(outputStream) TaskB solver = new TaskB(); solver new TaskB() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class TaskB {
        private boolean check(long a, long b) {
            return (a ^ b) >= 0;
        }

        public void solve(int testNumber, InputReader in, OutputWriter out) {
            long a = in.nextLong();
            long b = in.nextLong();
            long c = in.nextLong();
            long d = in.nextLong();
            long left = 0, right = 0;
            //++
            //--
            if (check(a, b)) {
                //++
                if (a >= 0) {
                    if (check(c, d)) {
                        if (c >= 0) {
                            left = Math.max(a, b);
                        } else {
                            left = Math.min(a, b);
                        }
                    } else {
                        left = Math.max(a, b);
                    }
                    right = Math.max(c, d);
                } else if (a < 0) {
                    //--
                    if (check(c, d)) {
                        if (c >= 0) {
                            //--++
                            left = Math.max(a, b);
                        } else {
                            left = Math.min(a, b);
                        }
                    } else {
                        left = Math.min(a, b);
                    }
                    right = Math.min(c, d);
                }
            } else {
                //+-
                if (check(c, d)) {
                    if (c >= 0) {
                        left = Math.max(a, b);
                        right = Math.max(c, d);
                    } else {
                        // +- --
                        left = Math.min(a, b);
                        right = Math.min(c, d);
                    }
                } else {
                    long max_ab = Math.max(a, b);
                    long min_ab = Math.min(a, b);
                    long max_cd = Math.max(c, d);
                    long min_cd = Math.min(c, d);
                    if (max_ab * max_cd > min_cd * min_ab) {
                        left = Math.max(a, b);
                        right = Math.max(c, d);
                    } else {
                        left = Math.min(a, b);
                        right = Math.min(c, d);
                    }
                }
            }
            out.print(left * right);
        }

    } TaskB private boolean check(long a, long b) {
            return (a ^ b) >= 0;
        } check {
            return (a ^ b) >= 0;
        } return (a ^ b) >= 0; (a ^ b) >= 0 (a ^ b) a b 0 long a a long b b public void solve(int testNumber, InputReader in, OutputWriter out) {
            long a = in.nextLong();
            long b = in.nextLong();
            long c = in.nextLong();
            long d = in.nextLong();
            long left = 0, right = 0;
            //++
            //--
            if (check(a, b)) {
                //++
                if (a >= 0) {
                    if (check(c, d)) {
                        if (c >= 0) {
                            left = Math.max(a, b);
                        } else {
                            left = Math.min(a, b);
                        }
                    } else {
                        left = Math.max(a, b);
                    }
                    right = Math.max(c, d);
                } else if (a < 0) {
                    //--
                    if (check(c, d)) {
                        if (c >= 0) {
                            //--++
                            left = Math.max(a, b);
                        } else {
                            left = Math.min(a, b);
                        }
                    } else {
                        left = Math.min(a, b);
                    }
                    right = Math.min(c, d);
                }
            } else {
                //+-
                if (check(c, d)) {
                    if (c >= 0) {
                        left = Math.max(a, b);
                        right = Math.max(c, d);
                    } else {
                        // +- --
                        left = Math.min(a, b);
                        right = Math.min(c, d);
                    }
                } else {
                    long max_ab = Math.max(a, b);
                    long min_ab = Math.min(a, b);
                    long max_cd = Math.max(c, d);
                    long min_cd = Math.min(c, d);
                    if (max_ab * max_cd > min_cd * min_ab) {
                        left = Math.max(a, b);
                        right = Math.max(c, d);
                    } else {
                        left = Math.min(a, b);
                        right = Math.min(c, d);
                    }
                }
            }
            out.print(left * right);
        } solve {
            long a = in.nextLong();
            long b = in.nextLong();
            long c = in.nextLong();
            long d = in.nextLong();
            long left = 0, right = 0;
            //++
            //--
            if (check(a, b)) {
                //++
                if (a >= 0) {
                    if (check(c, d)) {
                        if (c >= 0) {
                            left = Math.max(a, b);
                        } else {
                            left = Math.min(a, b);
                        }
                    } else {
                        left = Math.max(a, b);
                    }
                    right = Math.max(c, d);
                } else if (a < 0) {
                    //--
                    if (check(c, d)) {
                        if (c >= 0) {
                            //--++
                            left = Math.max(a, b);
                        } else {
                            left = Math.min(a, b);
                        }
                    } else {
                        left = Math.min(a, b);
                    }
                    right = Math.min(c, d);
                }
            } else {
                //+-
                if (check(c, d)) {
                    if (c >= 0) {
                        left = Math.max(a, b);
                        right = Math.max(c, d);
                    } else {
                        // +- --
                        left = Math.min(a, b);
                        right = Math.min(c, d);
                    }
                } else {
                    long max_ab = Math.max(a, b);
                    long min_ab = Math.min(a, b);
                    long max_cd = Math.max(c, d);
                    long min_cd = Math.min(c, d);
                    if (max_ab * max_cd > min_cd * min_ab) {
                        left = Math.max(a, b);
                        right = Math.max(c, d);
                    } else {
                        left = Math.min(a, b);
                        right = Math.min(c, d);
                    }
                }
            }
            out.print(left * right);
        } long a = in.nextLong(); a in.nextLong() in.nextLong in long b = in.nextLong(); b in.nextLong() in.nextLong in long c = in.nextLong(); c in.nextLong() in.nextLong in long d = in.nextLong(); d in.nextLong() in.nextLong in long left = 0 left 0 right = 0; right 0 if (check(a, b)) {
                //++
                if (a >= 0) {
                    if (check(c, d)) {
                        if (c >= 0) {
                            left = Math.max(a, b);
                        } else {
                            left = Math.min(a, b);
                        }
                    } else {
                        left = Math.max(a, b);
                    }
                    right = Math.max(c, d);
                } else if (a < 0) {
                    //--
                    if (check(c, d)) {
                        if (c >= 0) {
                            //--++
                            left = Math.max(a, b);
                        } else {
                            left = Math.min(a, b);
                        }
                    } else {
                        left = Math.min(a, b);
                    }
                    right = Math.min(c, d);
                }
            } else {
                //+-
                if (check(c, d)) {
                    if (c >= 0) {
                        left = Math.max(a, b);
                        right = Math.max(c, d);
                    } else {
                        // +- --
                        left = Math.min(a, b);
                        right = Math.min(c, d);
                    }
                } else {
                    long max_ab = Math.max(a, b);
                    long min_ab = Math.min(a, b);
                    long max_cd = Math.max(c, d);
                    long min_cd = Math.min(c, d);
                    if (max_ab * max_cd > min_cd * min_ab) {
                        left = Math.max(a, b);
                        right = Math.max(c, d);
                    } else {
                        left = Math.min(a, b);
                        right = Math.min(c, d);
                    }
                }
            } check(a, b) check a b {
                //++
                if (a >= 0) {
                    if (check(c, d)) {
                        if (c >= 0) {
                            left = Math.max(a, b);
                        } else {
                            left = Math.min(a, b);
                        }
                    } else {
                        left = Math.max(a, b);
                    }
                    right = Math.max(c, d);
                } else if (a < 0) {
                    //--
                    if (check(c, d)) {
                        if (c >= 0) {
                            //--++
                            left = Math.max(a, b);
                        } else {
                            left = Math.min(a, b);
                        }
                    } else {
                        left = Math.min(a, b);
                    }
                    right = Math.min(c, d);
                }
            } if (a >= 0) {
                    if (check(c, d)) {
                        if (c >= 0) {
                            left = Math.max(a, b);
                        } else {
                            left = Math.min(a, b);
                        }
                    } else {
                        left = Math.max(a, b);
                    }
                    right = Math.max(c, d);
                } else if (a < 0) {
                    //--
                    if (check(c, d)) {
                        if (c >= 0) {
                            //--++
                            left = Math.max(a, b);
                        } else {
                            left = Math.min(a, b);
                        }
                    } else {
                        left = Math.min(a, b);
                    }
                    right = Math.min(c, d);
                } a >= 0 a 0 {
                    if (check(c, d)) {
                        if (c >= 0) {
                            left = Math.max(a, b);
                        } else {
                            left = Math.min(a, b);
                        }
                    } else {
                        left = Math.max(a, b);
                    }
                    right = Math.max(c, d);
                } if (check(c, d)) {
                        if (c >= 0) {
                            left = Math.max(a, b);
                        } else {
                            left = Math.min(a, b);
                        }
                    } else {
                        left = Math.max(a, b);
                    } check(c, d) check c d {
                        if (c >= 0) {
                            left = Math.max(a, b);
                        } else {
                            left = Math.min(a, b);
                        }
                    } if (c >= 0) {
                            left = Math.max(a, b);
                        } else {
                            left = Math.min(a, b);
                        } c >= 0 c 0 {
                            left = Math.max(a, b);
                        } left = Math.max(a, b) left Math.max(a, b) Math.max Math a b {
                            left = Math.min(a, b);
                        } left = Math.min(a, b) left Math.min(a, b) Math.min Math a b {
                        left = Math.max(a, b);
                    } left = Math.max(a, b) left Math.max(a, b) Math.max Math a b right = Math.max(c, d) right Math.max(c, d) Math.max Math c d if (a < 0) {
                    //--
                    if (check(c, d)) {
                        if (c >= 0) {
                            //--++
                            left = Math.max(a, b);
                        } else {
                            left = Math.min(a, b);
                        }
                    } else {
                        left = Math.min(a, b);
                    }
                    right = Math.min(c, d);
                } a < 0 a 0 {
                    //--
                    if (check(c, d)) {
                        if (c >= 0) {
                            //--++
                            left = Math.max(a, b);
                        } else {
                            left = Math.min(a, b);
                        }
                    } else {
                        left = Math.min(a, b);
                    }
                    right = Math.min(c, d);
                } if (check(c, d)) {
                        if (c >= 0) {
                            //--++
                            left = Math.max(a, b);
                        } else {
                            left = Math.min(a, b);
                        }
                    } else {
                        left = Math.min(a, b);
                    } check(c, d) check c d {
                        if (c >= 0) {
                            //--++
                            left = Math.max(a, b);
                        } else {
                            left = Math.min(a, b);
                        }
                    } if (c >= 0) {
                            //--++
                            left = Math.max(a, b);
                        } else {
                            left = Math.min(a, b);
                        } c >= 0 c 0 {
                            //--++
                            left = Math.max(a, b);
                        } left = Math.max(a, b) left Math.max(a, b) Math.max Math a b {
                            left = Math.min(a, b);
                        } left = Math.min(a, b) left Math.min(a, b) Math.min Math a b {
                        left = Math.min(a, b);
                    } left = Math.min(a, b) left Math.min(a, b) Math.min Math a b right = Math.min(c, d) right Math.min(c, d) Math.min Math c d {
                //+-
                if (check(c, d)) {
                    if (c >= 0) {
                        left = Math.max(a, b);
                        right = Math.max(c, d);
                    } else {
                        // +- --
                        left = Math.min(a, b);
                        right = Math.min(c, d);
                    }
                } else {
                    long max_ab = Math.max(a, b);
                    long min_ab = Math.min(a, b);
                    long max_cd = Math.max(c, d);
                    long min_cd = Math.min(c, d);
                    if (max_ab * max_cd > min_cd * min_ab) {
                        left = Math.max(a, b);
                        right = Math.max(c, d);
                    } else {
                        left = Math.min(a, b);
                        right = Math.min(c, d);
                    }
                }
            } if (check(c, d)) {
                    if (c >= 0) {
                        left = Math.max(a, b);
                        right = Math.max(c, d);
                    } else {
                        // +- --
                        left = Math.min(a, b);
                        right = Math.min(c, d);
                    }
                } else {
                    long max_ab = Math.max(a, b);
                    long min_ab = Math.min(a, b);
                    long max_cd = Math.max(c, d);
                    long min_cd = Math.min(c, d);
                    if (max_ab * max_cd > min_cd * min_ab) {
                        left = Math.max(a, b);
                        right = Math.max(c, d);
                    } else {
                        left = Math.min(a, b);
                        right = Math.min(c, d);
                    }
                } check(c, d) check c d {
                    if (c >= 0) {
                        left = Math.max(a, b);
                        right = Math.max(c, d);
                    } else {
                        // +- --
                        left = Math.min(a, b);
                        right = Math.min(c, d);
                    }
                } if (c >= 0) {
                        left = Math.max(a, b);
                        right = Math.max(c, d);
                    } else {
                        // +- --
                        left = Math.min(a, b);
                        right = Math.min(c, d);
                    } c >= 0 c 0 {
                        left = Math.max(a, b);
                        right = Math.max(c, d);
                    } left = Math.max(a, b) left Math.max(a, b) Math.max Math a b right = Math.max(c, d) right Math.max(c, d) Math.max Math c d {
                        // +- --
                        left = Math.min(a, b);
                        right = Math.min(c, d);
                    } left = Math.min(a, b) left Math.min(a, b) Math.min Math a b right = Math.min(c, d) right Math.min(c, d) Math.min Math c d {
                    long max_ab = Math.max(a, b);
                    long min_ab = Math.min(a, b);
                    long max_cd = Math.max(c, d);
                    long min_cd = Math.min(c, d);
                    if (max_ab * max_cd > min_cd * min_ab) {
                        left = Math.max(a, b);
                        right = Math.max(c, d);
                    } else {
                        left = Math.min(a, b);
                        right = Math.min(c, d);
                    }
                } long max_ab = Math.max(a, b); max_ab Math.max(a, b) Math.max Math a b long min_ab = Math.min(a, b); min_ab Math.min(a, b) Math.min Math a b long max_cd = Math.max(c, d); max_cd Math.max(c, d) Math.max Math c d long min_cd = Math.min(c, d); min_cd Math.min(c, d) Math.min Math c d if (max_ab * max_cd > min_cd * min_ab) {
                        left = Math.max(a, b);
                        right = Math.max(c, d);
                    } else {
                        left = Math.min(a, b);
                        right = Math.min(c, d);
                    } max_ab * max_cd > min_cd * min_ab max_ab * max_cd max_ab max_cd min_cd * min_ab min_cd min_ab {
                        left = Math.max(a, b);
                        right = Math.max(c, d);
                    } left = Math.max(a, b) left Math.max(a, b) Math.max Math a b right = Math.max(c, d) right Math.max(c, d) Math.max Math c d {
                        left = Math.min(a, b);
                        right = Math.min(c, d);
                    } left = Math.min(a, b) left Math.min(a, b) Math.min Math a b right = Math.min(c, d) right Math.min(c, d) Math.min Math c d out.print(left * right) out.print out left * right left right int testNumber testNumber InputReader in in OutputWriter out out static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void close() {
            writer.close();
        }

        public void print(long i) {
            writer.print(i);
        }

    } OutputWriter private final PrintWriter writer; writer public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        } OutputWriter {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        } writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream))) writer new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream))) OutputStream outputStream outputStream public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        } OutputWriter {
            this.writer = new PrintWriter(writer);
        } this.writer = new PrintWriter(writer) this.writer this this.writer new PrintWriter(writer) Writer writer writer public void close() {
            writer.close();
        } close {
            writer.close();
        } writer.close() writer.close writer public void print(long i) {
            writer.print(i);
        } print {
            writer.print(i);
        } writer.print(i) writer.print writer i long i i static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    } InputReader private InputStream stream; stream private byte[] buf = new byte[1024]; buf new byte[1024] 1024 private int curChar; curChar private int numChars; numChars private InputReader.SpaceCharFilter filter; filter public InputReader(InputStream stream) {
            this.stream = stream;
        } InputReader {
            this.stream = stream;
        } this.stream = stream this.stream this this.stream stream InputStream stream stream public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        } read {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        } if (numChars == -1) {
                throw new InputMismatchException();
            } numChars == -1 numChars -1 1 {
                throw new InputMismatchException();
            } throw new InputMismatchException(); new InputMismatchException() if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            } curChar >= numChars curChar numChars {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            } curChar = 0 curChar 0 try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                } catch (IOException e) {
                    throw new InputMismatchException();
                } IOException e {
                    throw new InputMismatchException();
                } throw new InputMismatchException(); new InputMismatchException() {
                    numChars = stream.read(buf);
                } numChars = stream.read(buf) numChars stream.read(buf) stream.read stream buf if (numChars <= 0) {
                    return -1;
                } numChars <= 0 numChars 0 {
                    return -1;
                } return -1; -1 1 return buf[curChar++]; buf[curChar++] buf curChar++ curChar public long nextLong() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        } nextLong {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        } int c = read(); c read() read while (isSpaceChar(c)) {
                c = read();
            } isSpaceChar(c) isSpaceChar c {
                c = read();
            } c = read() c read() read int sgn = 1; sgn 1 if (c == '-') {
                sgn = -1;
                c = read();
            } c == '-' c '-' {
                sgn = -1;
                c = read();
            } sgn = -1 sgn -1 1 c = read() c read() read long res = 0; res 0 do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c)); !isSpaceChar(c) isSpaceChar(c) isSpaceChar c {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                } c < '0' || c > '9' c < '0' c '0' c > '9' c '9' {
                    throw new InputMismatchException();
                } throw new InputMismatchException(); new InputMismatchException() res *= 10 res 10 res += c - '0' res c - '0' c '0' c = read() c read() read return res * sgn; res * sgn res sgn public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        } isSpaceChar {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        } if (filter != null) {
                return filter.isSpaceChar(c);
            } filter != null filter null {
                return filter.isSpaceChar(c);
            } return filter.isSpaceChar(c); filter.isSpaceChar(c) filter.isSpaceChar filter c return isWhitespace(c); isWhitespace(c) isWhitespace c int c c public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        } isWhitespace {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        } return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1; c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1 c == '\t' c == '\r' c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1 c == ' ' c ' ' c == '\n' c '\n' c == '\r' c '\r' c == '\t' c '\t' c == -1 c -1 1 int c c public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        } SpaceCharFilter public boolean isSpaceChar(int ch); isSpaceChar int ch ch public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        private boolean check(long a, long b) {
            return (a ^ b) >= 0;
        }

        public void solve(int testNumber, InputReader in, OutputWriter out) {
            long a = in.nextLong();
            long b = in.nextLong();
            long c = in.nextLong();
            long d = in.nextLong();
            long left = 0, right = 0;
            //++
            //--
            if (check(a, b)) {
                //++
                if (a >= 0) {
                    if (check(c, d)) {
                        if (c >= 0) {
                            left = Math.max(a, b);
                        } else {
                            left = Math.min(a, b);
                        }
                    } else {
                        left = Math.max(a, b);
                    }
                    right = Math.max(c, d);
                } else if (a < 0) {
                    //--
                    if (check(c, d)) {
                        if (c >= 0) {
                            //--++
                            left = Math.max(a, b);
                        } else {
                            left = Math.min(a, b);
                        }
                    } else {
                        left = Math.min(a, b);
                    }
                    right = Math.min(c, d);
                }
            } else {
                //+-
                if (check(c, d)) {
                    if (c >= 0) {
                        left = Math.max(a, b);
                        right = Math.max(c, d);
                    } else {
                        // +- --
                        left = Math.min(a, b);
                        right = Math.min(c, d);
                    }
                } else {
                    long max_ab = Math.max(a, b);
                    long min_ab = Math.min(a, b);
                    long max_cd = Math.max(c, d);
                    long min_cd = Math.min(c, d);
                    if (max_ab * max_cd > min_cd * min_ab) {
                        left = Math.max(a, b);
                        right = Math.max(c, d);
                    } else {
                        left = Math.min(a, b);
                        right = Math.min(c, d);
                    }
                }
            }
            out.print(left * right);
        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void close() {
            writer.close();
        }

        public void print(long i) {
            writer.print(i);
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
} public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        private boolean check(long a, long b) {
            return (a ^ b) >= 0;
        }

        public void solve(int testNumber, InputReader in, OutputWriter out) {
            long a = in.nextLong();
            long b = in.nextLong();
            long c = in.nextLong();
            long d = in.nextLong();
            long left = 0, right = 0;
            //++
            //--
            if (check(a, b)) {
                //++
                if (a >= 0) {
                    if (check(c, d)) {
                        if (c >= 0) {
                            left = Math.max(a, b);
                        } else {
                            left = Math.min(a, b);
                        }
                    } else {
                        left = Math.max(a, b);
                    }
                    right = Math.max(c, d);
                } else if (a < 0) {
                    //--
                    if (check(c, d)) {
                        if (c >= 0) {
                            //--++
                            left = Math.max(a, b);
                        } else {
                            left = Math.min(a, b);
                        }
                    } else {
                        left = Math.min(a, b);
                    }
                    right = Math.min(c, d);
                }
            } else {
                //+-
                if (check(c, d)) {
                    if (c >= 0) {
                        left = Math.max(a, b);
                        right = Math.max(c, d);
                    } else {
                        // +- --
                        left = Math.min(a, b);
                        right = Math.min(c, d);
                    }
                } else {
                    long max_ab = Math.max(a, b);
                    long min_ab = Math.min(a, b);
                    long max_cd = Math.max(c, d);
                    long min_cd = Math.min(c, d);
                    if (max_ab * max_cd > min_cd * min_ab) {
                        left = Math.max(a, b);
                        right = Math.max(c, d);
                    } else {
                        left = Math.min(a, b);
                        right = Math.min(c, d);
                    }
                }
            }
            out.print(left * right);
        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void close() {
            writer.close();
        }

        public void print(long i) {
            writer.print(i);
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        private boolean check(long a, long b) {
            return (a ^ b) >= 0;
        }

        public void solve(int testNumber, InputReader in, OutputWriter out) {
            long a = in.nextLong();
            long b = in.nextLong();
            long c = in.nextLong();
            long d = in.nextLong();
            long left = 0, right = 0;
            //++
            //--
            if (check(a, b)) {
                //++
                if (a >= 0) {
                    if (check(c, d)) {
                        if (c >= 0) {
                            left = Math.max(a, b);
                        } else {
                            left = Math.min(a, b);
                        }
                    } else {
                        left = Math.max(a, b);
                    }
                    right = Math.max(c, d);
                } else if (a < 0) {
                    //--
                    if (check(c, d)) {
                        if (c >= 0) {
                            //--++
                            left = Math.max(a, b);
                        } else {
                            left = Math.min(a, b);
                        }
                    } else {
                        left = Math.min(a, b);
                    }
                    right = Math.min(c, d);
                }
            } else {
                //+-
                if (check(c, d)) {
                    if (c >= 0) {
                        left = Math.max(a, b);
                        right = Math.max(c, d);
                    } else {
                        // +- --
                        left = Math.min(a, b);
                        right = Math.min(c, d);
                    }
                } else {
                    long max_ab = Math.max(a, b);
                    long min_ab = Math.min(a, b);
                    long max_cd = Math.max(c, d);
                    long min_cd = Math.min(c, d);
                    if (max_ab * max_cd > min_cd * min_ab) {
                        left = Math.max(a, b);
                        right = Math.max(c, d);
                    } else {
                        left = Math.min(a, b);
                        right = Math.min(c, d);
                    }
                }
            }
            out.print(left * right);
        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void close() {
            writer.close();
        }

        public void print(long i) {
            writer.print(i);
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}

