import java.util.Scanner;

public class Main {

    public Main() {
    }

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

     long   p=Math.max(Math.max(a*c,b*d),Math.max(a*d,c*b));
        System.out.println(p);


    }
} import java.util.Scanner; Scanner java.util public class Main {

    public Main() {
    }

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

     long   p=Math.max(Math.max(a*c,b*d),Math.max(a*d,c*b));
        System.out.println(p);


    }
} Main public Main() {
    } Main {
    } public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
   long     a = scan.nextLong();
        long     b = scan.nextLong();
        long     c = scan.nextLong();
        long     d = scan.nextLong();

     long   p=Math.max(Math.max(a*c,b*d),Math.max(a*d,c*b));
        System.out.println(p);


    } main {
        Scanner scan = new Scanner(System.in);
   long     a = scan.nextLong();
        long     b = scan.nextLong();
        long     c = scan.nextLong();
        long     d = scan.nextLong();

     long   p=Math.max(Math.max(a*c,b*d),Math.max(a*d,c*b));
        System.out.println(p);


    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) long     a = scan.nextLong(); a scan.nextLong() scan.nextLong scan long     b = scan.nextLong(); b scan.nextLong() scan.nextLong scan long     c = scan.nextLong(); c scan.nextLong() scan.nextLong scan long     d = scan.nextLong(); d scan.nextLong() scan.nextLong scan long   p=Math.max(Math.max(a*c,b*d),Math.max(a*d,c*b)); p Math.max(Math.max(a*c,b*d),Math.max(a*d,c*b)) Math.max Math Math.max(a*c,b*d) Math.max Math a*c a c b*d b d Math.max(a*d,c*b) Math.max Math a*d a d c*b c b System.out.println(p) System.out.println System.out System System.out p String[] args args public class Main {

    public Main() {
    }

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

     long   p=Math.max(Math.max(a*c,b*d),Math.max(a*d,c*b));
        System.out.println(p);


    }
} public class Main {

    public Main() {
    }

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

     long   p=Math.max(Math.max(a*c,b*d),Math.max(a*d,c*b));
        System.out.println(p);


    }
} Main
import java.util.Scanner;

public class Main {

    public Main() {
    }

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

     long   p=Math.max(Math.max(a*c,b*d),Math.max(a*d,c*b));
        System.out.println(p);


    }
}
