import java.util.Scanner;

/**
 * B - Product Max
 * 整数 a,b,c,d が与えられます。
 * a≤x≤b,c≤y≤d を満たす整数 x,y について、x×y の最大値はいくつですか。
 */
public class Main {

    public static void main( String[] args ) {

        Scanner sc = new Scanner( System.in );
        // 入力値
        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long d = sc.nextLong();

        long[] vals = {a * c, a * d, b * c, b * d};
        long max = vals[0];
        for ( int i = 1; i < vals.length; i++ ) {
            max = Math.max( max, vals[i] );
        }

        System.out.println( max );

        sc.close();
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main( String[] args ) {

        Scanner sc = new Scanner( System.in );
        // 入力値
        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long d = sc.nextLong();

        long[] vals = {a * c, a * d, b * c, b * d};
        long max = vals[0];
        for ( int i = 1; i < vals.length; i++ ) {
            max = Math.max( max, vals[i] );
        }

        System.out.println( max );

        sc.close();
    }
} Main public static void main( String[] args ) {

        Scanner sc = new Scanner( System.in );
        // 入力値
        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long d = sc.nextLong();

        long[] vals = {a * c, a * d, b * c, b * d};
        long max = vals[0];
        for ( int i = 1; i < vals.length; i++ ) {
            max = Math.max( max, vals[i] );
        }

        System.out.println( max );

        sc.close();
    } main {

        Scanner sc = new Scanner( System.in );
        // 入力値
        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long d = sc.nextLong();

        long[] vals = {a * c, a * d, b * c, b * d};
        long max = vals[0];
        for ( int i = 1; i < vals.length; i++ ) {
            max = Math.max( max, vals[i] );
        }

        System.out.println( max );

        sc.close();
    } Scanner sc = new Scanner( System.in ); sc new Scanner( System.in ) long a = sc.nextLong(); a sc.nextLong() sc.nextLong sc long b = sc.nextLong(); b sc.nextLong() sc.nextLong sc long c = sc.nextLong(); c sc.nextLong() sc.nextLong sc long d = sc.nextLong(); d sc.nextLong() sc.nextLong sc long[] vals = {a * c, a * d, b * c, b * d}; vals {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 = vals[0]; max vals[0] vals 0 for ( int i = 1; i < vals.length; i++ ) {
            max = Math.max( max, vals[i] );
        } int i = 1; int i = 1; i 1 i < vals.length i vals.length vals vals.length i++ i++ i {
            max = Math.max( max, vals[i] );
        } {
            max = Math.max( max, vals[i] );
        } max = Math.max( max, vals[i] ) max Math.max( max, vals[i] ) Math.max Math max vals[i] vals i 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.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long d = sc.nextLong();

        long[] vals = {a * c, a * d, b * c, b * d};
        long max = vals[0];
        for ( int i = 1; i < vals.length; i++ ) {
            max = Math.max( max, vals[i] );
        }

        System.out.println( max );

        sc.close();
    }
} public class Main {

    public static void main( String[] args ) {

        Scanner sc = new Scanner( System.in );
        // 入力値
        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long d = sc.nextLong();

        long[] vals = {a * c, a * d, b * c, b * d};
        long max = vals[0];
        for ( int i = 1; i < vals.length; i++ ) {
            max = Math.max( max, vals[i] );
        }

        System.out.println( max );

        sc.close();
    }
} Main
import java.util.Scanner;

/**
 * B - Product Max
 * 整数 a,b,c,d が与えられます。
 * a≤x≤b,c≤y≤d を満たす整数 x,y について、x×y の最大値はいくつですか。
 */
public class Main {

    public static void main( String[] args ) {

        Scanner sc = new Scanner( System.in );
        // 入力値
        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long d = sc.nextLong();

        long[] vals = {a * c, a * d, b * c, b * d};
        long max = vals[0];
        for ( int i = 1; i < vals.length; i++ ) {
            max = Math.max( max, vals[i] );
        }

        System.out.println( max );

        sc.close();
    }
}