//package Test;

import java.util.*;

public class Main {

    static class Solution {

        void solve(long a, long b, long c, long d){
            long ans1 = Math.max(a * c, a * d);
            long ans2 = Math.max(b * c, b * d);
            System.out.println(Math.max(ans1, ans2));
        }
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long a = scanner.nextLong();
        long b = scanner.nextLong();
        long c = scanner.nextLong();
        long d = scanner.nextLong();
        Solution solution = new Solution();
        solution.solve(a, b, c, d);

    }
} import java.util.*; util.* java public class Main {

    static class Solution {

        void solve(long a, long b, long c, long d){
            long ans1 = Math.max(a * c, a * d);
            long ans2 = Math.max(b * c, b * d);
            System.out.println(Math.max(ans1, ans2));
        }
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long a = scanner.nextLong();
        long b = scanner.nextLong();
        long c = scanner.nextLong();
        long d = scanner.nextLong();
        Solution solution = new Solution();
        solution.solve(a, b, c, d);

    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long a = scanner.nextLong();
        long b = scanner.nextLong();
        long c = scanner.nextLong();
        long d = scanner.nextLong();
        Solution solution = new Solution();
        solution.solve(a, b, c, d);

    } main {
        Scanner scanner = new Scanner(System.in);
        long a = scanner.nextLong();
        long b = scanner.nextLong();
        long c = scanner.nextLong();
        long d = scanner.nextLong();
        Solution solution = new Solution();
        solution.solve(a, b, c, d);

    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) long a = scanner.nextLong(); a scanner.nextLong() scanner.nextLong scanner long b = scanner.nextLong(); b scanner.nextLong() scanner.nextLong scanner long c = scanner.nextLong(); c scanner.nextLong() scanner.nextLong scanner long d = scanner.nextLong(); d scanner.nextLong() scanner.nextLong scanner Solution solution = new Solution(); solution new Solution() solution.solve(a, b, c, d) solution.solve solution a b c d String[] args args static class Solution {

        void solve(long a, long b, long c, long d){
            long ans1 = Math.max(a * c, a * d);
            long ans2 = Math.max(b * c, b * d);
            System.out.println(Math.max(ans1, ans2));
        }
    } Solution void solve(long a, long b, long c, long d){
            long ans1 = Math.max(a * c, a * d);
            long ans2 = Math.max(b * c, b * d);
            System.out.println(Math.max(ans1, ans2));
        } solve {
            long ans1 = Math.max(a * c, a * d);
            long ans2 = Math.max(b * c, b * d);
            System.out.println(Math.max(ans1, ans2));
        } long ans1 = Math.max(a * c, a * d); ans1 Math.max(a * c, a * d) Math.max Math a * c a c a * d a d long ans2 = Math.max(b * c, b * d); ans2 Math.max(b * c, b * d) Math.max Math b * c b c b * d b d System.out.println(Math.max(ans1, ans2)) System.out.println System.out System System.out Math.max(ans1, ans2) Math.max Math ans1 ans2 long a a long b b long c c long d d public class Main {

    static class Solution {

        void solve(long a, long b, long c, long d){
            long ans1 = Math.max(a * c, a * d);
            long ans2 = Math.max(b * c, b * d);
            System.out.println(Math.max(ans1, ans2));
        }
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long a = scanner.nextLong();
        long b = scanner.nextLong();
        long c = scanner.nextLong();
        long d = scanner.nextLong();
        Solution solution = new Solution();
        solution.solve(a, b, c, d);

    }
} public class Main {

    static class Solution {

        void solve(long a, long b, long c, long d){
            long ans1 = Math.max(a * c, a * d);
            long ans2 = Math.max(b * c, b * d);
            System.out.println(Math.max(ans1, ans2));
        }
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long a = scanner.nextLong();
        long b = scanner.nextLong();
        long c = scanner.nextLong();
        long d = scanner.nextLong();
        Solution solution = new Solution();
        solution.solve(a, b, c, d);

    }
} Main
//package Test;

import java.util.*;

public class Main {

    static class Solution {

        void solve(long a, long b, long c, long d){
            long ans1 = Math.max(a * c, a * d);
            long ans2 = Math.max(b * c, b * d);
            System.out.println(Math.max(ans1, ans2));
        }
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long a = scanner.nextLong();
        long b = scanner.nextLong();
        long c = scanner.nextLong();
        long d = scanner.nextLong();
        Solution solution = new Solution();
        solution.solve(a, b, c, d);

    }
}
