import java.util.Scanner;

public class Main {
    public long getMaxProduct(int a, int b, int c, int d) {
        long cand1 = (long) a * (long) c;
        long cand2 = (long) a * (long) d;
        long cand3 = (long) b * (long) c;
        long cand4 = (long) b * (long) d;
        return Math.max(Math.max(cand1, cand2), Math.max(cand3, cand4));
    }

    public static void main(String[] args) throws Exception {
        Main solution = new Main();

        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int c = scanner.nextInt();
        int d = scanner.nextInt();

        long answer = solution.getMaxProduct(a, b, c, d);
        System.out.println(answer);
    }
}
/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz