import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long[] params = new long[4];
        for (int i = 0; i < 4; i++) {
            params[i] = scanner.nextInt();
        }
        long a = params[0];
        long b = params[1];
        long c = params[2];
        long d = params[3];

        if (a >= 0) {
            if (c >= 0) {
                System.out.println(b * d);
            } else if (d >= 0) {
                System.out.println(b * d);
            } else {
                System.out.println(a * d);
            }
        } else if (b >= 0) {

            if (c >= 0) {
                System.out.println(b * d);
            } else if (d >= 0) {
                // a<0  b>=0   c<0  d>=0
                if (a * c  > b * d) {
                    System.out.println(a * c);
                } else {
                    System.out.println(b * d);
                }
            } else {
                System.out.println(a * c);
            }

        } else {

            if (c >= 0) {
                System.out.println(b * c);
            } else if (d >= 0) {
                System.out.println(a * c);
            } else {
                System.out.println(a * c);
            }

        }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long[] params = new long[4];
        for (int i = 0; i < 4; i++) {
            params[i] = scanner.nextInt();
        }
        long a = params[0];
        long b = params[1];
        long c = params[2];
        long d = params[3];

        if (a >= 0) {
            if (c >= 0) {
                System.out.println(b * d);
            } else if (d >= 0) {
                System.out.println(b * d);
            } else {
                System.out.println(a * d);
            }
        } else if (b >= 0) {

            if (c >= 0) {
                System.out.println(b * d);
            } else if (d >= 0) {
                // a<0  b>=0   c<0  d>=0
                if (a * c  > b * d) {
                    System.out.println(a * c);
                } else {
                    System.out.println(b * d);
                }
            } else {
                System.out.println(a * c);
            }

        } else {

            if (c >= 0) {
                System.out.println(b * c);
            } else if (d >= 0) {
                System.out.println(a * c);
            } else {
                System.out.println(a * c);
            }

        }
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long[] params = new long[4];
        for (int i = 0; i < 4; i++) {
            params[i] = scanner.nextInt();
        }
        long a = params[0];
        long b = params[1];
        long c = params[2];
        long d = params[3];

        if (a >= 0) {
            if (c >= 0) {
                System.out.println(b * d);
            } else if (d >= 0) {
                System.out.println(b * d);
            } else {
                System.out.println(a * d);
            }
        } else if (b >= 0) {

            if (c >= 0) {
                System.out.println(b * d);
            } else if (d >= 0) {
                // a<0  b>=0   c<0  d>=0
                if (a * c  > b * d) {
                    System.out.println(a * c);
                } else {
                    System.out.println(b * d);
                }
            } else {
                System.out.println(a * c);
            }

        } else {

            if (c >= 0) {
                System.out.println(b * c);
            } else if (d >= 0) {
                System.out.println(a * c);
            } else {
                System.out.println(a * c);
            }

        }
    } main {
        Scanner scanner = new Scanner(System.in);
        long[] params = new long[4];
        for (int i = 0; i < 4; i++) {
            params[i] = scanner.nextInt();
        }
        long a = params[0];
        long b = params[1];
        long c = params[2];
        long d = params[3];

        if (a >= 0) {
            if (c >= 0) {
                System.out.println(b * d);
            } else if (d >= 0) {
                System.out.println(b * d);
            } else {
                System.out.println(a * d);
            }
        } else if (b >= 0) {

            if (c >= 0) {
                System.out.println(b * d);
            } else if (d >= 0) {
                // a<0  b>=0   c<0  d>=0
                if (a * c  > b * d) {
                    System.out.println(a * c);
                } else {
                    System.out.println(b * d);
                }
            } else {
                System.out.println(a * c);
            }

        } else {

            if (c >= 0) {
                System.out.println(b * c);
            } else if (d >= 0) {
                System.out.println(a * c);
            } else {
                System.out.println(a * c);
            }

        }
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) long[] params = new long[4]; params new long[4] 4 for (int i = 0; i < 4; i++) {
            params[i] = scanner.nextInt();
        } int i = 0; int i = 0; i 0 i < 4 i 4 i++ i++ i {
            params[i] = scanner.nextInt();
        } {
            params[i] = scanner.nextInt();
        } params[i] = scanner.nextInt() params[i] params i scanner.nextInt() scanner.nextInt scanner long a = params[0]; a params[0] params 0 long b = params[1]; b params[1] params 1 long c = params[2]; c params[2] params 2 long d = params[3]; d params[3] params 3 if (a >= 0) {
            if (c >= 0) {
                System.out.println(b * d);
            } else if (d >= 0) {
                System.out.println(b * d);
            } else {
                System.out.println(a * d);
            }
        } else if (b >= 0) {

            if (c >= 0) {
                System.out.println(b * d);
            } else if (d >= 0) {
                // a<0  b>=0   c<0  d>=0
                if (a * c  > b * d) {
                    System.out.println(a * c);
                } else {
                    System.out.println(b * d);
                }
            } else {
                System.out.println(a * c);
            }

        } else {

            if (c >= 0) {
                System.out.println(b * c);
            } else if (d >= 0) {
                System.out.println(a * c);
            } else {
                System.out.println(a * c);
            }

        } a >= 0 a 0 {
            if (c >= 0) {
                System.out.println(b * d);
            } else if (d >= 0) {
                System.out.println(b * d);
            } else {
                System.out.println(a * d);
            }
        } if (c >= 0) {
                System.out.println(b * d);
            } else if (d >= 0) {
                System.out.println(b * d);
            } else {
                System.out.println(a * d);
            } c >= 0 c 0 {
                System.out.println(b * d);
            } System.out.println(b * d) System.out.println System.out System System.out b * d b d if (d >= 0) {
                System.out.println(b * d);
            } else {
                System.out.println(a * d);
            } d >= 0 d 0 {
                System.out.println(b * d);
            } System.out.println(b * d) System.out.println System.out System System.out b * d b d {
                System.out.println(a * d);
            } System.out.println(a * d) System.out.println System.out System System.out a * d a d if (b >= 0) {

            if (c >= 0) {
                System.out.println(b * d);
            } else if (d >= 0) {
                // a<0  b>=0   c<0  d>=0
                if (a * c  > b * d) {
                    System.out.println(a * c);
                } else {
                    System.out.println(b * d);
                }
            } else {
                System.out.println(a * c);
            }

        } else {

            if (c >= 0) {
                System.out.println(b * c);
            } else if (d >= 0) {
                System.out.println(a * c);
            } else {
                System.out.println(a * c);
            }

        } b >= 0 b 0 {

            if (c >= 0) {
                System.out.println(b * d);
            } else if (d >= 0) {
                // a<0  b>=0   c<0  d>=0
                if (a * c  > b * d) {
                    System.out.println(a * c);
                } else {
                    System.out.println(b * d);
                }
            } else {
                System.out.println(a * c);
            }

        } if (c >= 0) {
                System.out.println(b * d);
            } else if (d >= 0) {
                // a<0  b>=0   c<0  d>=0
                if (a * c  > b * d) {
                    System.out.println(a * c);
                } else {
                    System.out.println(b * d);
                }
            } else {
                System.out.println(a * c);
            } c >= 0 c 0 {
                System.out.println(b * d);
            } System.out.println(b * d) System.out.println System.out System System.out b * d b d if (d >= 0) {
                // a<0  b>=0   c<0  d>=0
                if (a * c  > b * d) {
                    System.out.println(a * c);
                } else {
                    System.out.println(b * d);
                }
            } else {
                System.out.println(a * c);
            } d >= 0 d 0 {
                // a<0  b>=0   c<0  d>=0
                if (a * c  > b * d) {
                    System.out.println(a * c);
                } else {
                    System.out.println(b * d);
                }
            } if (a * c  > b * d) {
                    System.out.println(a * c);
                } else {
                    System.out.println(b * d);
                } a * c  > b * d a * c a c b * d b d {
                    System.out.println(a * c);
                } System.out.println(a * c) System.out.println System.out System System.out a * c a c {
                    System.out.println(b * d);
                } System.out.println(b * d) System.out.println System.out System System.out b * d b d {
                System.out.println(a * c);
            } System.out.println(a * c) System.out.println System.out System System.out a * c a c {

            if (c >= 0) {
                System.out.println(b * c);
            } else if (d >= 0) {
                System.out.println(a * c);
            } else {
                System.out.println(a * c);
            }

        } if (c >= 0) {
                System.out.println(b * c);
            } else if (d >= 0) {
                System.out.println(a * c);
            } else {
                System.out.println(a * c);
            } c >= 0 c 0 {
                System.out.println(b * c);
            } System.out.println(b * c) System.out.println System.out System System.out b * c b c if (d >= 0) {
                System.out.println(a * c);
            } else {
                System.out.println(a * c);
            } d >= 0 d 0 {
                System.out.println(a * c);
            } System.out.println(a * c) System.out.println System.out System System.out a * c a c {
                System.out.println(a * c);
            } System.out.println(a * c) System.out.println System.out System System.out a * c a c String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long[] params = new long[4];
        for (int i = 0; i < 4; i++) {
            params[i] = scanner.nextInt();
        }
        long a = params[0];
        long b = params[1];
        long c = params[2];
        long d = params[3];

        if (a >= 0) {
            if (c >= 0) {
                System.out.println(b * d);
            } else if (d >= 0) {
                System.out.println(b * d);
            } else {
                System.out.println(a * d);
            }
        } else if (b >= 0) {

            if (c >= 0) {
                System.out.println(b * d);
            } else if (d >= 0) {
                // a<0  b>=0   c<0  d>=0
                if (a * c  > b * d) {
                    System.out.println(a * c);
                } else {
                    System.out.println(b * d);
                }
            } else {
                System.out.println(a * c);
            }

        } else {

            if (c >= 0) {
                System.out.println(b * c);
            } else if (d >= 0) {
                System.out.println(a * c);
            } else {
                System.out.println(a * c);
            }

        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long[] params = new long[4];
        for (int i = 0; i < 4; i++) {
            params[i] = scanner.nextInt();
        }
        long a = params[0];
        long b = params[1];
        long c = params[2];
        long d = params[3];

        if (a >= 0) {
            if (c >= 0) {
                System.out.println(b * d);
            } else if (d >= 0) {
                System.out.println(b * d);
            } else {
                System.out.println(a * d);
            }
        } else if (b >= 0) {

            if (c >= 0) {
                System.out.println(b * d);
            } else if (d >= 0) {
                // a<0  b>=0   c<0  d>=0
                if (a * c  > b * d) {
                    System.out.println(a * c);
                } else {
                    System.out.println(b * d);
                }
            } else {
                System.out.println(a * c);
            }

        } else {

            if (c >= 0) {
                System.out.println(b * c);
            } else if (d >= 0) {
                System.out.println(a * c);
            } else {
                System.out.println(a * c);
            }

        }
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long[] params = new long[4];
        for (int i = 0; i < 4; i++) {
            params[i] = scanner.nextInt();
        }
        long a = params[0];
        long b = params[1];
        long c = params[2];
        long d = params[3];

        if (a >= 0) {
            if (c >= 0) {
                System.out.println(b * d);
            } else if (d >= 0) {
                System.out.println(b * d);
            } else {
                System.out.println(a * d);
            }
        } else if (b >= 0) {

            if (c >= 0) {
                System.out.println(b * d);
            } else if (d >= 0) {
                // a<0  b>=0   c<0  d>=0
                if (a * c  > b * d) {
                    System.out.println(a * c);
                } else {
                    System.out.println(b * d);
                }
            } else {
                System.out.println(a * c);
            }

        } else {

            if (c >= 0) {
                System.out.println(b * c);
            } else if (d >= 0) {
                System.out.println(a * c);
            } else {
                System.out.println(a * c);
            }

        }
    }
}