import java.io.*;
import java.math.*;
import java.security.*;
import java.text.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.function.*;
import java.util.regex.*;
import java.util.stream.*;
import static java.util.stream.Collectors.joining;
import static java.util.stream.Collectors.toList;

public class Main
{
    public static void main(String[] args)
    {
        Scanner in = new Scanner(System.in);
        long a=in.nextLong();
        long b=in.nextLong();
        long c=in.nextLong();
        long d=in.nextLong();
        System.out.println(Math.max(Math.max(a*c, a*d), Math.max(b*c, b*d)));
        
        
    }
} import java.io.*; io.* java import java.math.*; math.* java import java.security.*; security.* java import java.text.*; text.* java import java.util.*; util.* java import java.util.concurrent.*; concurrent.* java.util import java.util.function.*; function.* java.util import java.util.regex.*; regex.* java.util import java.util.stream.*; stream.* java.util import static java.util.stream.Collectors.joining; import static java.util.stream.Collectors.joining; import static java.util.stream.Collectors.joining; import static java.util.stream.Collectors.toList; import static java.util.stream.Collectors.toList; import static java.util.stream.Collectors.toList; public class Main
{
    public static void main(String[] args)
    {
        Scanner in = new Scanner(System.in);
        long a=in.nextLong();
        long b=in.nextLong();
        long c=in.nextLong();
        long d=in.nextLong();
        System.out.println(Math.max(Math.max(a*c, a*d), Math.max(b*c, b*d)));
        
        
    }
} Main public static void main(String[] args)
    {
        Scanner in = new Scanner(System.in);
        long a=in.nextLong();
        long b=in.nextLong();
        long c=in.nextLong();
        long d=in.nextLong();
        System.out.println(Math.max(Math.max(a*c, a*d), Math.max(b*c, b*d)));
        
        
    } main {
        Scanner in = new Scanner(System.in);
        long a=in.nextLong();
        long b=in.nextLong();
        long c=in.nextLong();
        long d=in.nextLong();
        System.out.println(Math.max(Math.max(a*c, a*d), Math.max(b*c, b*d)));
        
        
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) long a=in.nextLong(); a in.nextLong() in.nextLong in long b=in.nextLong(); b in.nextLong() in.nextLong in long c=in.nextLong(); c in.nextLong() in.nextLong in long d=in.nextLong(); d in.nextLong() in.nextLong in System.out.println(Math.max(Math.max(a*c, a*d), Math.max(b*c, b*d))) System.out.println System.out System System.out Math.max(Math.max(a*c, a*d), Math.max(b*c, b*d)) Math.max Math Math.max(a*c, a*d) Math.max Math a*c a c 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 in = new Scanner(System.in);
        long a=in.nextLong();
        long b=in.nextLong();
        long c=in.nextLong();
        long d=in.nextLong();
        System.out.println(Math.max(Math.max(a*c, a*d), Math.max(b*c, b*d)));
        
        
    }
} public class Main
{
    public static void main(String[] args)
    {
        Scanner in = new Scanner(System.in);
        long a=in.nextLong();
        long b=in.nextLong();
        long c=in.nextLong();
        long d=in.nextLong();
        System.out.println(Math.max(Math.max(a*c, a*d), Math.max(b*c, b*d)));
        
        
    }
} Main
import java.io.*;
import java.math.*;
import java.security.*;
import java.text.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.function.*;
import java.util.regex.*;
import java.util.stream.*;
import static java.util.stream.Collectors.joining;
import static java.util.stream.Collectors.toList;

public class Main
{
    public static void main(String[] args)
    {
        Scanner in = new Scanner(System.in);
        long a=in.nextLong();
        long b=in.nextLong();
        long c=in.nextLong();
        long d=in.nextLong();
        System.out.println(Math.max(Math.max(a*c, a*d), Math.max(b*c, b*d)));
        
        
    }
}