import java.util.*;

public class Main
{
    public static void main(String[] args) {
        //long start = System.currentTimeMillis();
        Scanner sc = new Scanner(System.in);
        long[] a = new long[2];
        long[] b = new long[2];
        a[0] = sc.nextLong();
        a[1] = sc.nextLong();
        b[0] = sc.nextLong();
        b[1] = sc.nextLong();

        long max = Long.MIN_VALUE;
        for (int i = 0;i<2;++i)
        {
            for (int j = 0;j<2;++j)
            {
                long tmp = a[i]*b[j];
                max = Math.max(tmp,max);
            }
        }
        System.out.println(max);
        sc.close();
//        long end = System.currentTimeMillis();
//        System.err.println((end-start)+"ms");
    }
} import java.util.*; util.* java public class Main
{
    public static void main(String[] args) {
        //long start = System.currentTimeMillis();
        Scanner sc = new Scanner(System.in);
        long[] a = new long[2];
        long[] b = new long[2];
        a[0] = sc.nextLong();
        a[1] = sc.nextLong();
        b[0] = sc.nextLong();
        b[1] = sc.nextLong();

        long max = Long.MIN_VALUE;
        for (int i = 0;i<2;++i)
        {
            for (int j = 0;j<2;++j)
            {
                long tmp = a[i]*b[j];
                max = Math.max(tmp,max);
            }
        }
        System.out.println(max);
        sc.close();
//        long end = System.currentTimeMillis();
//        System.err.println((end-start)+"ms");
    }
} Main public static void main(String[] args) {
        //long start = System.currentTimeMillis();
        Scanner sc = new Scanner(System.in);
        long[] a = new long[2];
        long[] b = new long[2];
        a[0] = sc.nextLong();
        a[1] = sc.nextLong();
        b[0] = sc.nextLong();
        b[1] = sc.nextLong();

        long max = Long.MIN_VALUE;
        for (int i = 0;i<2;++i)
        {
            for (int j = 0;j<2;++j)
            {
                long tmp = a[i]*b[j];
                max = Math.max(tmp,max);
            }
        }
        System.out.println(max);
        sc.close();
//        long end = System.currentTimeMillis();
//        System.err.println((end-start)+"ms");
    } main {
        //long start = System.currentTimeMillis();
        Scanner sc = new Scanner(System.in);
        long[] a = new long[2];
        long[] b = new long[2];
        a[0] = sc.nextLong();
        a[1] = sc.nextLong();
        b[0] = sc.nextLong();
        b[1] = sc.nextLong();

        long max = Long.MIN_VALUE;
        for (int i = 0;i<2;++i)
        {
            for (int j = 0;j<2;++j)
            {
                long tmp = a[i]*b[j];
                max = Math.max(tmp,max);
            }
        }
        System.out.println(max);
        sc.close();
//        long end = System.currentTimeMillis();
//        System.err.println((end-start)+"ms");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long[] a = new long[2]; a new long[2] 2 long[] b = new long[2]; b new long[2] 2 a[0] = sc.nextLong() a[0] a 0 sc.nextLong() sc.nextLong sc a[1] = sc.nextLong() a[1] a 1 sc.nextLong() sc.nextLong sc b[0] = sc.nextLong() b[0] b 0 sc.nextLong() sc.nextLong sc b[1] = sc.nextLong() b[1] b 1 sc.nextLong() sc.nextLong sc long max = Long.MIN_VALUE; max Long.MIN_VALUE Long Long.MIN_VALUE for (int i = 0;i<2;++i)
        {
            for (int j = 0;j<2;++j)
            {
                long tmp = a[i]*b[j];
                max = Math.max(tmp,max);
            }
        } int i = 0; int i = 0; i 0 i<2 i 2 ++i ++i i {
            for (int j = 0;j<2;++j)
            {
                long tmp = a[i]*b[j];
                max = Math.max(tmp,max);
            }
        } {
            for (int j = 0;j<2;++j)
            {
                long tmp = a[i]*b[j];
                max = Math.max(tmp,max);
            }
        } for (int j = 0;j<2;++j)
            {
                long tmp = a[i]*b[j];
                max = Math.max(tmp,max);
            } int j = 0; int j = 0; j 0 j<2 j 2 ++j ++j j {
                long tmp = a[i]*b[j];
                max = Math.max(tmp,max);
            } {
                long tmp = a[i]*b[j];
                max = Math.max(tmp,max);
            } long tmp = a[i]*b[j]; tmp a[i]*b[j] a[i] a i b[j] b j max = Math.max(tmp,max) max Math.max(tmp,max) Math.max Math tmp max 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) {
        //long start = System.currentTimeMillis();
        Scanner sc = new Scanner(System.in);
        long[] a = new long[2];
        long[] b = new long[2];
        a[0] = sc.nextLong();
        a[1] = sc.nextLong();
        b[0] = sc.nextLong();
        b[1] = sc.nextLong();

        long max = Long.MIN_VALUE;
        for (int i = 0;i<2;++i)
        {
            for (int j = 0;j<2;++j)
            {
                long tmp = a[i]*b[j];
                max = Math.max(tmp,max);
            }
        }
        System.out.println(max);
        sc.close();
//        long end = System.currentTimeMillis();
//        System.err.println((end-start)+"ms");
    }
} public class Main
{
    public static void main(String[] args) {
        //long start = System.currentTimeMillis();
        Scanner sc = new Scanner(System.in);
        long[] a = new long[2];
        long[] b = new long[2];
        a[0] = sc.nextLong();
        a[1] = sc.nextLong();
        b[0] = sc.nextLong();
        b[1] = sc.nextLong();

        long max = Long.MIN_VALUE;
        for (int i = 0;i<2;++i)
        {
            for (int j = 0;j<2;++j)
            {
                long tmp = a[i]*b[j];
                max = Math.max(tmp,max);
            }
        }
        System.out.println(max);
        sc.close();
//        long end = System.currentTimeMillis();
//        System.err.println((end-start)+"ms");
    }
} Main
import java.util.*;

public class Main
{
    public static void main(String[] args) {
        //long start = System.currentTimeMillis();
        Scanner sc = new Scanner(System.in);
        long[] a = new long[2];
        long[] b = new long[2];
        a[0] = sc.nextLong();
        a[1] = sc.nextLong();
        b[0] = sc.nextLong();
        b[1] = sc.nextLong();

        long max = Long.MIN_VALUE;
        for (int i = 0;i<2;++i)
        {
            for (int j = 0;j<2;++j)
            {
                long tmp = a[i]*b[j];
                max = Math.max(tmp,max);
            }
        }
        System.out.println(max);
        sc.close();
//        long end = System.currentTimeMillis();
//        System.err.println((end-start)+"ms");
    }
}