
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        long a = Integer.parseInt(scan.next());
        long b = Integer.parseInt(scan.next());
        long c = Integer.parseInt(scan.next());
        long d = Integer.parseInt(scan.next());
        scan.close();

        long max = a * c;
        max = Math.max(max, a * d);
        max = Math.max(max, b * c);
        max = Math.max(max, b * d);

        System.out.println(max);
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        long a = Integer.parseInt(scan.next());
        long b = Integer.parseInt(scan.next());
        long c = Integer.parseInt(scan.next());
        long d = Integer.parseInt(scan.next());
        scan.close();

        long max = a * c;
        max = Math.max(max, a * d);
        max = Math.max(max, b * c);
        max = Math.max(max, b * d);

        System.out.println(max);
    }
} Main public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        long a = Integer.parseInt(scan.next());
        long b = Integer.parseInt(scan.next());
        long c = Integer.parseInt(scan.next());
        long d = Integer.parseInt(scan.next());
        scan.close();

        long max = a * c;
        max = Math.max(max, a * d);
        max = Math.max(max, b * c);
        max = Math.max(max, b * d);

        System.out.println(max);
    } main {
        Scanner scan = new Scanner(System.in);
        long a = Integer.parseInt(scan.next());
        long b = Integer.parseInt(scan.next());
        long c = Integer.parseInt(scan.next());
        long d = Integer.parseInt(scan.next());
        scan.close();

        long max = a * c;
        max = Math.max(max, a * d);
        max = Math.max(max, b * c);
        max = Math.max(max, b * d);

        System.out.println(max);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) long a = Integer.parseInt(scan.next()); a Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan long b = Integer.parseInt(scan.next()); b Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan long c = Integer.parseInt(scan.next()); c Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan long d = Integer.parseInt(scan.next()); d Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan scan.close() scan.close scan long max = a * c; max a * c a c max = Math.max(max, a * d) max Math.max(max, a * d) Math.max Math max a * d a d max = Math.max(max, b * c) max Math.max(max, b * c) Math.max Math max b * c b c max = Math.max(max, b * d) max Math.max(max, b * d) Math.max Math max b * d b d 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 scan = new Scanner(System.in);
        long a = Integer.parseInt(scan.next());
        long b = Integer.parseInt(scan.next());
        long c = Integer.parseInt(scan.next());
        long d = Integer.parseInt(scan.next());
        scan.close();

        long max = a * c;
        max = Math.max(max, a * d);
        max = Math.max(max, b * c);
        max = Math.max(max, b * d);

        System.out.println(max);
    }
} public class Main {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        long a = Integer.parseInt(scan.next());
        long b = Integer.parseInt(scan.next());
        long c = Integer.parseInt(scan.next());
        long d = Integer.parseInt(scan.next());
        scan.close();

        long max = a * c;
        max = Math.max(max, a * d);
        max = Math.max(max, b * c);
        max = Math.max(max, b * d);

        System.out.println(max);
    }
} Main

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        long a = Integer.parseInt(scan.next());
        long b = Integer.parseInt(scan.next());
        long c = Integer.parseInt(scan.next());
        long d = Integer.parseInt(scan.next());
        scan.close();

        long max = a * c;
        max = Math.max(max, a * d);
        max = Math.max(max, b * c);
        max = Math.max(max, b * d);

        System.out.println(max);
    }
}
