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

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long d = sc.nextLong();
        ArrayList<Long> list = new ArrayList<>();
        list.add(a * c);
        list.add(a * d);
        list.add(b * c);
        list.add(b * d);
        System.out.println(Collections.max(list));
    }
} import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections 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.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long d = sc.nextLong();
        ArrayList<Long> list = new ArrayList<>();
        list.add(a * c);
        list.add(a * d);
        list.add(b * c);
        list.add(b * d);
        System.out.println(Collections.max(list));
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long d = sc.nextLong();
        ArrayList<Long> list = new ArrayList<>();
        list.add(a * c);
        list.add(a * d);
        list.add(b * c);
        list.add(b * d);
        System.out.println(Collections.max(list));
    } main {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long d = sc.nextLong();
        ArrayList<Long> list = new ArrayList<>();
        list.add(a * c);
        list.add(a * d);
        list.add(b * c);
        list.add(b * d);
        System.out.println(Collections.max(list));
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long a = sc.nextLong(); a sc.nextLong() sc.nextLong sc long b = sc.nextLong(); b sc.nextLong() sc.nextLong sc long c = sc.nextLong(); c sc.nextLong() sc.nextLong sc long d = sc.nextLong(); d sc.nextLong() sc.nextLong sc ArrayList<Long> list = new ArrayList<>(); list new ArrayList<>() list.add(a * c) list.add list a * c a c list.add(a * d) list.add list a * d a d list.add(b * c) list.add list b * c b c list.add(b * d) list.add list b * d b d System.out.println(Collections.max(list)) System.out.println System.out System System.out Collections.max(list) Collections.max Collections list String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long d = sc.nextLong();
        ArrayList<Long> list = new ArrayList<>();
        list.add(a * c);
        list.add(a * d);
        list.add(b * c);
        list.add(b * d);
        System.out.println(Collections.max(list));
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long d = sc.nextLong();
        ArrayList<Long> list = new ArrayList<>();
        list.add(a * c);
        list.add(a * d);
        list.add(b * c);
        list.add(b * d);
        System.out.println(Collections.max(list));
    }
} Main
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long d = sc.nextLong();
        ArrayList<Long> list = new ArrayList<>();
        list.add(a * c);
        list.add(a * d);
        list.add(b * c);
        list.add(b * d);
        System.out.println(Collections.max(list));
    }
}