import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = Long.parseLong(sc.next());
        long b = Long.parseLong(sc.next());
        long c = Long.parseLong(sc.next());
        long d = Long.parseLong(sc.next());
        if(Math.max(a*c,Math.max(a*d,Math.max(b*c,b*d))) < 0) {
            if(a <= 0 && b >= 0 || c <= 0 && d >= 0) {
                System.out.println(0);
            }else {
                System.out.println(Math.max(a*c,Math.max(a*d,Math.max(b*c,b*d))));
            }
        }else {
            System.out.println(Math.max(a*c,Math.max(a*d,Math.max(b*c,b*d))));
        }
    }
}
 import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = Long.parseLong(sc.next());
        long b = Long.parseLong(sc.next());
        long c = Long.parseLong(sc.next());
        long d = Long.parseLong(sc.next());
        if(Math.max(a*c,Math.max(a*d,Math.max(b*c,b*d))) < 0) {
            if(a <= 0 && b >= 0 || c <= 0 && d >= 0) {
                System.out.println(0);
            }else {
                System.out.println(Math.max(a*c,Math.max(a*d,Math.max(b*c,b*d))));
            }
        }else {
            System.out.println(Math.max(a*c,Math.max(a*d,Math.max(b*c,b*d))));
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = Long.parseLong(sc.next());
        long b = Long.parseLong(sc.next());
        long c = Long.parseLong(sc.next());
        long d = Long.parseLong(sc.next());
        if(Math.max(a*c,Math.max(a*d,Math.max(b*c,b*d))) < 0) {
            if(a <= 0 && b >= 0 || c <= 0 && d >= 0) {
                System.out.println(0);
            }else {
                System.out.println(Math.max(a*c,Math.max(a*d,Math.max(b*c,b*d))));
            }
        }else {
            System.out.println(Math.max(a*c,Math.max(a*d,Math.max(b*c,b*d))));
        }
    } main {
        Scanner sc = new Scanner(System.in);
        long a = Long.parseLong(sc.next());
        long b = Long.parseLong(sc.next());
        long c = Long.parseLong(sc.next());
        long d = Long.parseLong(sc.next());
        if(Math.max(a*c,Math.max(a*d,Math.max(b*c,b*d))) < 0) {
            if(a <= 0 && b >= 0 || c <= 0 && d >= 0) {
                System.out.println(0);
            }else {
                System.out.println(Math.max(a*c,Math.max(a*d,Math.max(b*c,b*d))));
            }
        }else {
            System.out.println(Math.max(a*c,Math.max(a*d,Math.max(b*c,b*d))));
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long a = Long.parseLong(sc.next()); a Long.parseLong(sc.next()) Long.parseLong Long sc.next() sc.next sc long b = Long.parseLong(sc.next()); b Long.parseLong(sc.next()) Long.parseLong Long sc.next() sc.next sc long c = Long.parseLong(sc.next()); c Long.parseLong(sc.next()) Long.parseLong Long sc.next() sc.next sc long d = Long.parseLong(sc.next()); d Long.parseLong(sc.next()) Long.parseLong Long sc.next() sc.next sc if(Math.max(a*c,Math.max(a*d,Math.max(b*c,b*d))) < 0) {
            if(a <= 0 && b >= 0 || c <= 0 && d >= 0) {
                System.out.println(0);
            }else {
                System.out.println(Math.max(a*c,Math.max(a*d,Math.max(b*c,b*d))));
            }
        }else {
            System.out.println(Math.max(a*c,Math.max(a*d,Math.max(b*c,b*d))));
        } Math.max(a*c,Math.max(a*d,Math.max(b*c,b*d))) < 0 Math.max(a*c,Math.max(a*d,Math.max(b*c,b*d))) Math.max Math a*c a c Math.max(a*d,Math.max(b*c,b*d)) Math.max Math a*d a d Math.max(b*c,b*d) Math.max Math b*c b c b*d b d 0 {
            if(a <= 0 && b >= 0 || c <= 0 && d >= 0) {
                System.out.println(0);
            }else {
                System.out.println(Math.max(a*c,Math.max(a*d,Math.max(b*c,b*d))));
            }
        } if(a <= 0 && b >= 0 || c <= 0 && d >= 0) {
                System.out.println(0);
            }else {
                System.out.println(Math.max(a*c,Math.max(a*d,Math.max(b*c,b*d))));
            } a <= 0 && b >= 0 || c <= 0 && d >= 0 a <= 0 && b >= 0 a <= 0 a 0 b >= 0 b 0 c <= 0 && d >= 0 c <= 0 c 0 d >= 0 d 0 {
                System.out.println(0);
            } System.out.println(0) System.out.println System.out System System.out 0 {
                System.out.println(Math.max(a*c,Math.max(a*d,Math.max(b*c,b*d))));
            } System.out.println(Math.max(a*c,Math.max(a*d,Math.max(b*c,b*d)))) System.out.println System.out System System.out Math.max(a*c,Math.max(a*d,Math.max(b*c,b*d))) Math.max Math a*c a c Math.max(a*d,Math.max(b*c,b*d)) Math.max Math a*d a d Math.max(b*c,b*d) Math.max Math b*c b c b*d b d {
            System.out.println(Math.max(a*c,Math.max(a*d,Math.max(b*c,b*d))));
        } System.out.println(Math.max(a*c,Math.max(a*d,Math.max(b*c,b*d)))) System.out.println System.out System System.out Math.max(a*c,Math.max(a*d,Math.max(b*c,b*d))) Math.max Math a*c a c Math.max(a*d,Math.max(b*c,b*d)) Math.max Math a*d a d Math.max(b*c,b*d) Math.max Math b*c b c b*d b d String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = Long.parseLong(sc.next());
        long b = Long.parseLong(sc.next());
        long c = Long.parseLong(sc.next());
        long d = Long.parseLong(sc.next());
        if(Math.max(a*c,Math.max(a*d,Math.max(b*c,b*d))) < 0) {
            if(a <= 0 && b >= 0 || c <= 0 && d >= 0) {
                System.out.println(0);
            }else {
                System.out.println(Math.max(a*c,Math.max(a*d,Math.max(b*c,b*d))));
            }
        }else {
            System.out.println(Math.max(a*c,Math.max(a*d,Math.max(b*c,b*d))));
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = Long.parseLong(sc.next());
        long b = Long.parseLong(sc.next());
        long c = Long.parseLong(sc.next());
        long d = Long.parseLong(sc.next());
        if(Math.max(a*c,Math.max(a*d,Math.max(b*c,b*d))) < 0) {
            if(a <= 0 && b >= 0 || c <= 0 && d >= 0) {
                System.out.println(0);
            }else {
                System.out.println(Math.max(a*c,Math.max(a*d,Math.max(b*c,b*d))));
            }
        }else {
            System.out.println(Math.max(a*c,Math.max(a*d,Math.max(b*c,b*d))));
        }
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = Long.parseLong(sc.next());
        long b = Long.parseLong(sc.next());
        long c = Long.parseLong(sc.next());
        long d = Long.parseLong(sc.next());
        if(Math.max(a*c,Math.max(a*d,Math.max(b*c,b*d))) < 0) {
            if(a <= 0 && b >= 0 || c <= 0 && d >= 0) {
                System.out.println(0);
            }else {
                System.out.println(Math.max(a*c,Math.max(a*d,Math.max(b*c,b*d))));
            }
        }else {
            System.out.println(Math.max(a*c,Math.max(a*d,Math.max(b*c,b*d))));
        }
    }
}

