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();
        long max = 0;

        max = a * c;

        if (a*d >= max) {
            max = a*d;
        }
        if (b*c>=max) {
                max = b*c;
        }
        if (b*d>=max) {
            max = b*d;
        }
            
        System.out.println(max);
        sc.close();
    }
} 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();
        long max = 0;

        max = a * c;

        if (a*d >= max) {
            max = a*d;
        }
        if (b*c>=max) {
                max = b*c;
        }
        if (b*d>=max) {
            max = b*d;
        }
            
        System.out.println(max);
        sc.close();
    }
} 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();
        long max = 0;

        max = a * c;

        if (a*d >= max) {
            max = a*d;
        }
        if (b*c>=max) {
                max = b*c;
        }
        if (b*d>=max) {
            max = b*d;
        }
            
        System.out.println(max);
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);

        long a = sc.nextInt();
        long b = sc.nextInt();
        long c = sc.nextInt();
        long d = sc.nextInt();
        long max = 0;

        max = a * c;

        if (a*d >= max) {
            max = a*d;
        }
        if (b*c>=max) {
                max = b*c;
        }
        if (b*d>=max) {
            max = b*d;
        }
            
        System.out.println(max);
        sc.close();
    } 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 long max = 0; max 0 max = a * c max a * c a c if (a*d >= max) {
            max = a*d;
        } a*d >= max a*d a d max {
            max = a*d;
        } max = a*d max a*d a d if (b*c>=max) {
                max = b*c;
        } b*c>=max b*c b c max {
                max = b*c;
        } max = b*c max b*c b c if (b*d>=max) {
            max = b*d;
        } b*d>=max b*d b d max {
            max = b*d;
        } max = b*d max b*d b d System.out.println(max) System.out.println System.out System System.out max sc.close() sc.close sc 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();
        long max = 0;

        max = a * c;

        if (a*d >= max) {
            max = a*d;
        }
        if (b*c>=max) {
                max = b*c;
        }
        if (b*d>=max) {
            max = b*d;
        }
            
        System.out.println(max);
        sc.close();
    }
} 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();
        long max = 0;

        max = a * c;

        if (a*d >= max) {
            max = a*d;
        }
        if (b*c>=max) {
                max = b*c;
        }
        if (b*d>=max) {
            max = b*d;
        }
            
        System.out.println(max);
        sc.close();
    }
} 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();
        long max = 0;

        max = a * c;

        if (a*d >= max) {
            max = a*d;
        }
        if (b*c>=max) {
                max = b*c;
        }
        if (b*d>=max) {
            max = b*d;
        }
            
        System.out.println(max);
        sc.close();
    }
}