import java.util.Scanner;
import java.util.Vector;

class Main {
    public static void main(String[] args) {
        Scanner ler = new Scanner(System.in);
        long a = ler.nextLong(), b = ler.nextLong(), c = ler.nextLong(), d = ler.nextLong();
        Vector<Long> v = new Vector<>();

        v.add(a*c);
        v.add(a*d);
        v.add(b*c);
        v.add(b*d);
        v.sort(null);

        System.out.println(v.lastElement());
    }   
} import java.util.Scanner; Scanner java.util import java.util.Vector; Vector java.util class Main {
    public static void main(String[] args) {
        Scanner ler = new Scanner(System.in);
        long a = ler.nextLong(), b = ler.nextLong(), c = ler.nextLong(), d = ler.nextLong();
        Vector<Long> v = new Vector<>();

        v.add(a*c);
        v.add(a*d);
        v.add(b*c);
        v.add(b*d);
        v.sort(null);

        System.out.println(v.lastElement());
    }   
} Main public static void main(String[] args) {
        Scanner ler = new Scanner(System.in);
        long a = ler.nextLong(), b = ler.nextLong(), c = ler.nextLong(), d = ler.nextLong();
        Vector<Long> v = new Vector<>();

        v.add(a*c);
        v.add(a*d);
        v.add(b*c);
        v.add(b*d);
        v.sort(null);

        System.out.println(v.lastElement());
    } main {
        Scanner ler = new Scanner(System.in);
        long a = ler.nextLong(), b = ler.nextLong(), c = ler.nextLong(), d = ler.nextLong();
        Vector<Long> v = new Vector<>();

        v.add(a*c);
        v.add(a*d);
        v.add(b*c);
        v.add(b*d);
        v.sort(null);

        System.out.println(v.lastElement());
    } Scanner ler = new Scanner(System.in); ler new Scanner(System.in) long a = ler.nextLong() a ler.nextLong() ler.nextLong ler b = ler.nextLong() b ler.nextLong() ler.nextLong ler c = ler.nextLong() c ler.nextLong() ler.nextLong ler d = ler.nextLong(); d ler.nextLong() ler.nextLong ler Vector<Long> v = new Vector<>(); v new Vector<>() v.add(a*c) v.add v a*c a c v.add(a*d) v.add v a*d a d v.add(b*c) v.add v b*c b c v.add(b*d) v.add v b*d b d v.sort(null) v.sort v null System.out.println(v.lastElement()) System.out.println System.out System System.out v.lastElement() v.lastElement v String[] args args
import java.util.Scanner;
import java.util.Vector;

class Main {
    public static void main(String[] args) {
        Scanner ler = new Scanner(System.in);
        long a = ler.nextLong(), b = ler.nextLong(), c = ler.nextLong(), d = ler.nextLong();
        Vector<Long> v = new Vector<>();

        v.add(a*c);
        v.add(a*d);
        v.add(b*c);
        v.add(b*d);
        v.sort(null);

        System.out.println(v.lastElement());
    }   
}
