import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextInt();
        long b = sc.nextInt();
        long c = sc.nextInt();
        long d = sc.nextInt();
        sc.close();
        long ansList[] = {a*c, a*d, b*c, b*d};
        long max = ansList[0];
        for(int i=0; i<ansList.length; i++) {
            if (max<ansList[i]) {
                max=ansList[i];
            }
        }
        System.out.println(max);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextInt();
        long b = sc.nextInt();
        long c = sc.nextInt();
        long d = sc.nextInt();
        sc.close();
        long ansList[] = {a*c, a*d, b*c, b*d};
        long max = ansList[0];
        for(int i=0; i<ansList.length; i++) {
            if (max<ansList[i]) {
                max=ansList[i];
            }
        }
        System.out.println(max);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextInt();
        long b = sc.nextInt();
        long c = sc.nextInt();
        long d = sc.nextInt();
        sc.close();
        long ansList[] = {a*c, a*d, b*c, b*d};
        long max = ansList[0];
        for(int i=0; i<ansList.length; i++) {
            if (max<ansList[i]) {
                max=ansList[i];
            }
        }
        System.out.println(max);
    } main {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextInt();
        long b = sc.nextInt();
        long c = sc.nextInt();
        long d = sc.nextInt();
        sc.close();
        long ansList[] = {a*c, a*d, b*c, b*d};
        long max = ansList[0];
        for(int i=0; i<ansList.length; i++) {
            if (max<ansList[i]) {
                max=ansList[i];
            }
        }
        System.out.println(max);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long a = sc.nextInt(); a sc.nextInt() sc.nextInt sc long b = sc.nextInt(); b sc.nextInt() sc.nextInt sc long c = sc.nextInt(); c sc.nextInt() sc.nextInt sc long d = sc.nextInt(); d sc.nextInt() sc.nextInt sc sc.close() sc.close sc long ansList[] = {a*c, a*d, b*c, b*d}; ansList {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 = ansList[0]; max ansList[0] ansList 0 for(int i=0; i<ansList.length; i++) {
            if (max<ansList[i]) {
                max=ansList[i];
            }
        } int i=0; int i=0; i 0 i<ansList.length i ansList.length ansList ansList.length i++ i++ i {
            if (max<ansList[i]) {
                max=ansList[i];
            }
        } {
            if (max<ansList[i]) {
                max=ansList[i];
            }
        } if (max<ansList[i]) {
                max=ansList[i];
            } max<ansList[i] max ansList[i] ansList i {
                max=ansList[i];
            } max=ansList[i] max ansList[i] ansList i System.out.println(max) System.out.println System.out System System.out max String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextInt();
        long b = sc.nextInt();
        long c = sc.nextInt();
        long d = sc.nextInt();
        sc.close();
        long ansList[] = {a*c, a*d, b*c, b*d};
        long max = ansList[0];
        for(int i=0; i<ansList.length; i++) {
            if (max<ansList[i]) {
                max=ansList[i];
            }
        }
        System.out.println(max);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextInt();
        long b = sc.nextInt();
        long c = sc.nextInt();
        long d = sc.nextInt();
        sc.close();
        long ansList[] = {a*c, a*d, b*c, b*d};
        long max = ansList[0];
        for(int i=0; i<ansList.length; i++) {
            if (max<ansList[i]) {
                max=ansList[i];
            }
        }
        System.out.println(max);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextInt();
        long b = sc.nextInt();
        long c = sc.nextInt();
        long d = sc.nextInt();
        sc.close();
        long ansList[] = {a*c, a*d, b*c, b*d};
        long max = ansList[0];
        for(int i=0; i<ansList.length; i++) {
            if (max<ansList[i]) {
                max=ansList[i];
            }
        }
        System.out.println(max);
    }
}
