import 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();
        long ac = a * c;
        long ad = a * d;
        long bc = b * c;
        long bd = b * d;
        long max = ac;
        if (max < ad) max = ad;
        if (max < bc) max = bc;
        if (max < bd) max = bd;
        System.out.print(max);
    }
} import java.util.*; util.* java 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();
        long ac = a * c;
        long ad = a * d;
        long bc = b * c;
        long bd = b * d;
        long max = ac;
        if (max < ad) max = ad;
        if (max < bc) max = bc;
        if (max < bd) max = bd;
        System.out.print(max);
    }
} 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();
        long ac = a * c;
        long ad = a * d;
        long bc = b * c;
        long bd = b * d;
        long max = ac;
        if (max < ad) max = ad;
        if (max < bc) max = bc;
        if (max < bd) max = bd;
        System.out.print(max);
    } main {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long d = sc.nextLong();
        long ac = a * c;
        long ad = a * d;
        long bc = b * c;
        long bd = b * d;
        long max = ac;
        if (max < ad) max = ad;
        if (max < bc) max = bc;
        if (max < bd) max = bd;
        System.out.print(max);
    } 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 long ac = a * c; ac a * c a c long ad = a * d; ad a * d a d long bc = b * c; bc b * c b c long bd = b * d; bd b * d b d long max = ac; max ac if (max < ad) max = ad; max < ad max ad max = ad max ad if (max < bc) max = bc; max < bc max bc max = bc max bc if (max < bd) max = bd; max < bd max bd max = bd max bd System.out.print(max) System.out.print System.out System System.out max 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();
        long ac = a * c;
        long ad = a * d;
        long bc = b * c;
        long bd = b * d;
        long max = ac;
        if (max < ad) max = ad;
        if (max < bc) max = bc;
        if (max < bd) max = bd;
        System.out.print(max);
    }
} 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();
        long ac = a * c;
        long ad = a * d;
        long bc = b * c;
        long bd = b * d;
        long max = ac;
        if (max < ad) max = ad;
        if (max < bc) max = bc;
        if (max < bd) max = bd;
        System.out.print(max);
    }
} Main
import 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();
        long ac = a * c;
        long ad = a * d;
        long bc = b * c;
        long bd = b * d;
        long max = ac;
        if (max < ad) max = ad;
        if (max < bc) max = bc;
        if (max < bd) max = bd;
        System.out.print(max);
    }
}
