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();
        
        //aとbが0以下かつ
        ArrayList<Long> result = new ArrayList<>();
        
        result.add(a*c);
        result.add(a*d);
        result.add(b*c);
        result.add(b*d);

        Long max = Collections.max(result);
        System.out.println(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();
        
        //aとbが0以下かつ
        ArrayList<Long> result = new ArrayList<>();
        
        result.add(a*c);
        result.add(a*d);
        result.add(b*c);
        result.add(b*d);

        Long max = Collections.max(result);
        System.out.println(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();
        
        //aとbが0以下かつ
        ArrayList<Long> result = new ArrayList<>();
        
        result.add(a*c);
        result.add(a*d);
        result.add(b*c);
        result.add(b*d);

        Long max = Collections.max(result);
        System.out.println(max);
    } main {
       
        Scanner sc = new Scanner(System.in);
        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long d = sc.nextLong();
        
        //aとbが0以下かつ
        ArrayList<Long> result = new ArrayList<>();
        
        result.add(a*c);
        result.add(a*d);
        result.add(b*c);
        result.add(b*d);

        Long max = Collections.max(result);
        System.out.println(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 ArrayList<Long> result = new ArrayList<>(); result new ArrayList<>() result.add(a*c) result.add result a*c a c result.add(a*d) result.add result a*d a d result.add(b*c) result.add result b*c b c result.add(b*d) result.add result b*d b d Long max = Collections.max(result); max Collections.max(result) Collections.max Collections result System.out.println(max) System.out.println 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();
        
        //aとbが0以下かつ
        ArrayList<Long> result = new ArrayList<>();
        
        result.add(a*c);
        result.add(a*d);
        result.add(b*c);
        result.add(b*d);

        Long max = Collections.max(result);
        System.out.println(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();
        
        //aとbが0以下かつ
        ArrayList<Long> result = new ArrayList<>();
        
        result.add(a*c);
        result.add(a*d);
        result.add(b*c);
        result.add(b*d);

        Long max = Collections.max(result);
        System.out.println(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();
        
        //aとbが0以下かつ
        ArrayList<Long> result = new ArrayList<>();
        
        result.add(a*c);
        result.add(a*d);
        result.add(b*c);
        result.add(b*d);

        Long max = Collections.max(result);
        System.out.println(max);
    }
}