import java.util.*;
class Main{
    static Scanner sr = new Scanner(System.in);

    public static void main(String[] args) throws java.lang.Exception {
        long a = sr.nextLong();
        long b = sr.nextLong();
        long c = sr.nextLong();
        long d = sr.nextLong();
        long ans[]=new long[4];
        ans[0]=a*c;
        ans[1]=a*d;
        ans[2]=b*c;
        ans[3]=b*d;
        Arrays.sort(ans);
        System.out.println(ans[3]);


        }
    }

 import java.util.*; util.* java class Main{
    static Scanner sr = new Scanner(System.in);

    public static void main(String[] args) throws java.lang.Exception {
        long a = sr.nextLong();
        long b = sr.nextLong();
        long c = sr.nextLong();
        long d = sr.nextLong();
        long ans[]=new long[4];
        ans[0]=a*c;
        ans[1]=a*d;
        ans[2]=b*c;
        ans[3]=b*d;
        Arrays.sort(ans);
        System.out.println(ans[3]);


        }
    } Main static Scanner sr = new Scanner(System.in); sr new Scanner(System.in) public static void main(String[] args) throws java.lang.Exception {
        long a = sr.nextLong();
        long b = sr.nextLong();
        long c = sr.nextLong();
        long d = sr.nextLong();
        long ans[]=new long[4];
        ans[0]=a*c;
        ans[1]=a*d;
        ans[2]=b*c;
        ans[3]=b*d;
        Arrays.sort(ans);
        System.out.println(ans[3]);


        } main {
        long a = sr.nextLong();
        long b = sr.nextLong();
        long c = sr.nextLong();
        long d = sr.nextLong();
        long ans[]=new long[4];
        ans[0]=a*c;
        ans[1]=a*d;
        ans[2]=b*c;
        ans[3]=b*d;
        Arrays.sort(ans);
        System.out.println(ans[3]);


        } long a = sr.nextLong(); a sr.nextLong() sr.nextLong sr long b = sr.nextLong(); b sr.nextLong() sr.nextLong sr long c = sr.nextLong(); c sr.nextLong() sr.nextLong sr long d = sr.nextLong(); d sr.nextLong() sr.nextLong sr long ans[]=new long[4]; ans new long[4] 4 ans[0]=a*c ans[0] ans 0 a*c a c ans[1]=a*d ans[1] ans 1 a*d a d ans[2]=b*c ans[2] ans 2 b*c b c ans[3]=b*d ans[3] ans 3 b*d b d Arrays.sort(ans) Arrays.sort Arrays ans System.out.println(ans[3]) System.out.println System.out System System.out ans[3] ans 3 String[] args args
import java.util.*;
class Main{
    static Scanner sr = new Scanner(System.in);

    public static void main(String[] args) throws java.lang.Exception {
        long a = sr.nextLong();
        long b = sr.nextLong();
        long c = sr.nextLong();
        long d = sr.nextLong();
        long ans[]=new long[4];
        ans[0]=a*c;
        ans[1]=a*d;
        ans[2]=b*c;
        ans[3]=b*d;
        Arrays.sort(ans);
        System.out.println(ans[3]);


        }
    }


