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;
        System.out.println(Math.max(Math.max(AC, AD), Math.max(BC, BD)));
    }
    
} 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;
        System.out.println(Math.max(Math.max(AC, AD), Math.max(BC, BD)));
    }
    
} 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;
        System.out.println(Math.max(Math.max(AC, AD), Math.max(BC, BD)));
    } 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;
        System.out.println(Math.max(Math.max(AC, AD), Math.max(BC, BD)));
    } 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 System.out.println(Math.max(Math.max(AC, AD), Math.max(BC, BD))) System.out.println System.out System System.out Math.max(Math.max(AC, AD), Math.max(BC, BD)) Math.max Math Math.max(AC, AD) Math.max Math AC AD Math.max(BC, BD) Math.max Math BC BD 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;
        System.out.println(Math.max(Math.max(AC, AD), Math.max(BC, BD)));
    }
    
} 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;
        System.out.println(Math.max(Math.max(AC, AD), Math.max(BC, BD)));
    }
    
} 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;
        System.out.println(Math.max(Math.max(AC, AD), Math.max(BC, BD)));
    }
    
}
