import java.util.Scanner;

public class Main {


    public static void main(String args[]){

        Scanner src = new Scanner(System.in);

        int a = src.nextInt();
        int b = src.nextInt();
        int c = src.nextInt();
        int d  = src.nextInt();

        long max = (long)a*(long)c;

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

        System.out.println(max);

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


    public static void main(String args[]){

        Scanner src = new Scanner(System.in);

        int a = src.nextInt();
        int b = src.nextInt();
        int c = src.nextInt();
        int d  = src.nextInt();

        long max = (long)a*(long)c;

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

        System.out.println(max);

    }
} Main public static void main(String args[]){

        Scanner src = new Scanner(System.in);

        int a = src.nextInt();
        int b = src.nextInt();
        int c = src.nextInt();
        int d  = src.nextInt();

        long max = (long)a*(long)c;

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

        System.out.println(max);

    } main {

        Scanner src = new Scanner(System.in);

        int a = src.nextInt();
        int b = src.nextInt();
        int c = src.nextInt();
        int d  = src.nextInt();

        long max = (long)a*(long)c;

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

        System.out.println(max);

    } Scanner src = new Scanner(System.in); src new Scanner(System.in) int a = src.nextInt(); a src.nextInt() src.nextInt src int b = src.nextInt(); b src.nextInt() src.nextInt src int c = src.nextInt(); c src.nextInt() src.nextInt src int d  = src.nextInt(); d src.nextInt() src.nextInt src long max = (long)a*(long)c; max (long)a*(long)c (long)a (long)c max = Math.max((long)b*(long)d,max) max Math.max((long)b*(long)d,max) Math.max Math (long)b*(long)d (long)b (long)d max max = Math.max((long)a*(long)d,max) max Math.max((long)a*(long)d,max) Math.max Math (long)a*(long)d (long)a (long)d max max = Math.max((long)b*(long)c,max) max Math.max((long)b*(long)c,max) Math.max Math (long)b*(long)c (long)b (long)c max 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 src = new Scanner(System.in);

        int a = src.nextInt();
        int b = src.nextInt();
        int c = src.nextInt();
        int d  = src.nextInt();

        long max = (long)a*(long)c;

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

        System.out.println(max);

    }
} public class Main {


    public static void main(String args[]){

        Scanner src = new Scanner(System.in);

        int a = src.nextInt();
        int b = src.nextInt();
        int c = src.nextInt();
        int d  = src.nextInt();

        long max = (long)a*(long)c;

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

        System.out.println(max);

    }
} Main
import java.util.Scanner;

public class Main {


    public static void main(String args[]){

        Scanner src = new Scanner(System.in);

        int a = src.nextInt();
        int b = src.nextInt();
        int c = src.nextInt();
        int d  = src.nextInt();

        long max = (long)a*(long)c;

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

        System.out.println(max);

    }
}
