import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;


public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextInt();
        long b = sc.nextInt();
        long c = sc.nextInt();
        long d = sc.nextInt();
        List<Long>str = new ArrayList<>();
        str.add(a*c);
        str.add(a*d);
        str.add(b*c);
        str.add(b*d);
        Collections.sort(str,Collections.reverseOrder());
        System.out.println(str.get(0));
    }
} import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextInt();
        long b = sc.nextInt();
        long c = sc.nextInt();
        long d = sc.nextInt();
        List<Long>str = new ArrayList<>();
        str.add(a*c);
        str.add(a*d);
        str.add(b*c);
        str.add(b*d);
        Collections.sort(str,Collections.reverseOrder());
        System.out.println(str.get(0));
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextInt();
        long b = sc.nextInt();
        long c = sc.nextInt();
        long d = sc.nextInt();
        List<Long>str = new ArrayList<>();
        str.add(a*c);
        str.add(a*d);
        str.add(b*c);
        str.add(b*d);
        Collections.sort(str,Collections.reverseOrder());
        System.out.println(str.get(0));
    } main {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextInt();
        long b = sc.nextInt();
        long c = sc.nextInt();
        long d = sc.nextInt();
        List<Long>str = new ArrayList<>();
        str.add(a*c);
        str.add(a*d);
        str.add(b*c);
        str.add(b*d);
        Collections.sort(str,Collections.reverseOrder());
        System.out.println(str.get(0));
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long a = sc.nextInt(); a sc.nextInt() sc.nextInt sc long b = sc.nextInt(); b sc.nextInt() sc.nextInt sc long c = sc.nextInt(); c sc.nextInt() sc.nextInt sc long d = sc.nextInt(); d sc.nextInt() sc.nextInt sc List<Long>str = new ArrayList<>(); str new ArrayList<>() str.add(a*c) str.add str a*c a c str.add(a*d) str.add str a*d a d str.add(b*c) str.add str b*c b c str.add(b*d) str.add str b*d b d Collections.sort(str,Collections.reverseOrder()) Collections.sort Collections str Collections.reverseOrder() Collections.reverseOrder Collections System.out.println(str.get(0)) System.out.println System.out System System.out str.get(0) str.get str 0 String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextInt();
        long b = sc.nextInt();
        long c = sc.nextInt();
        long d = sc.nextInt();
        List<Long>str = new ArrayList<>();
        str.add(a*c);
        str.add(a*d);
        str.add(b*c);
        str.add(b*d);
        Collections.sort(str,Collections.reverseOrder());
        System.out.println(str.get(0));
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextInt();
        long b = sc.nextInt();
        long c = sc.nextInt();
        long d = sc.nextInt();
        List<Long>str = new ArrayList<>();
        str.add(a*c);
        str.add(a*d);
        str.add(b*c);
        str.add(b*d);
        Collections.sort(str,Collections.reverseOrder());
        System.out.println(str.get(0));
    }
} Main
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;


public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextInt();
        long b = sc.nextInt();
        long c = sc.nextInt();
        long d = sc.nextInt();
        List<Long>str = new ArrayList<>();
        str.add(a*c);
        str.add(a*d);
        str.add(b*c);
        str.add(b*d);
        Collections.sort(str,Collections.reverseOrder());
        System.out.println(str.get(0));
    }
}
