
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String x = sc.nextLine();
        String[] data = x.split(" ");
        List<BigDecimal> dataDecimalList = new ArrayList();
        for(String a: data){
            BigDecimal bd = new BigDecimal(a);
            dataDecimalList.add(bd);
        }
        List<BigDecimal> targetList = new ArrayList();
        targetList.add(dataDecimalList.get(0).multiply(dataDecimalList.get(2)));
        targetList.add(dataDecimalList.get(0).multiply(dataDecimalList.get(3)));
        targetList.add(dataDecimalList.get(1).multiply(dataDecimalList.get(2)));
        targetList.add(dataDecimalList.get(1).multiply(dataDecimalList.get(3)));

        BigDecimal max = new BigDecimal("-1000000000000000000000000000000000000000000000000000000000000000000000000000");
        for(BigDecimal target: targetList){
            if(max.compareTo(target) == -1){
                max = target;
            }
        }
        System.out.println(max);
    }
} import java.math.BigDecimal; BigDecimal java.math import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String x = sc.nextLine();
        String[] data = x.split(" ");
        List<BigDecimal> dataDecimalList = new ArrayList();
        for(String a: data){
            BigDecimal bd = new BigDecimal(a);
            dataDecimalList.add(bd);
        }
        List<BigDecimal> targetList = new ArrayList();
        targetList.add(dataDecimalList.get(0).multiply(dataDecimalList.get(2)));
        targetList.add(dataDecimalList.get(0).multiply(dataDecimalList.get(3)));
        targetList.add(dataDecimalList.get(1).multiply(dataDecimalList.get(2)));
        targetList.add(dataDecimalList.get(1).multiply(dataDecimalList.get(3)));

        BigDecimal max = new BigDecimal("-1000000000000000000000000000000000000000000000000000000000000000000000000000");
        for(BigDecimal target: targetList){
            if(max.compareTo(target) == -1){
                max = target;
            }
        }
        System.out.println(max);
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String x = sc.nextLine();
        String[] data = x.split(" ");
        List<BigDecimal> dataDecimalList = new ArrayList();
        for(String a: data){
            BigDecimal bd = new BigDecimal(a);
            dataDecimalList.add(bd);
        }
        List<BigDecimal> targetList = new ArrayList();
        targetList.add(dataDecimalList.get(0).multiply(dataDecimalList.get(2)));
        targetList.add(dataDecimalList.get(0).multiply(dataDecimalList.get(3)));
        targetList.add(dataDecimalList.get(1).multiply(dataDecimalList.get(2)));
        targetList.add(dataDecimalList.get(1).multiply(dataDecimalList.get(3)));

        BigDecimal max = new BigDecimal("-1000000000000000000000000000000000000000000000000000000000000000000000000000");
        for(BigDecimal target: targetList){
            if(max.compareTo(target) == -1){
                max = target;
            }
        }
        System.out.println(max);
    } main {
        Scanner sc = new Scanner(System.in);
        String x = sc.nextLine();
        String[] data = x.split(" ");
        List<BigDecimal> dataDecimalList = new ArrayList();
        for(String a: data){
            BigDecimal bd = new BigDecimal(a);
            dataDecimalList.add(bd);
        }
        List<BigDecimal> targetList = new ArrayList();
        targetList.add(dataDecimalList.get(0).multiply(dataDecimalList.get(2)));
        targetList.add(dataDecimalList.get(0).multiply(dataDecimalList.get(3)));
        targetList.add(dataDecimalList.get(1).multiply(dataDecimalList.get(2)));
        targetList.add(dataDecimalList.get(1).multiply(dataDecimalList.get(3)));

        BigDecimal max = new BigDecimal("-1000000000000000000000000000000000000000000000000000000000000000000000000000");
        for(BigDecimal target: targetList){
            if(max.compareTo(target) == -1){
                max = target;
            }
        }
        System.out.println(max);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String x = sc.nextLine(); x sc.nextLine() sc.nextLine sc String[] data = x.split(" "); data x.split(" ") x.split x " " List<BigDecimal> dataDecimalList = new ArrayList(); dataDecimalList new ArrayList() for(String a: data){
            BigDecimal bd = new BigDecimal(a);
            dataDecimalList.add(bd);
        } String a data {
            BigDecimal bd = new BigDecimal(a);
            dataDecimalList.add(bd);
        } {
            BigDecimal bd = new BigDecimal(a);
            dataDecimalList.add(bd);
        } BigDecimal bd = new BigDecimal(a); bd new BigDecimal(a) dataDecimalList.add(bd) dataDecimalList.add dataDecimalList bd List<BigDecimal> targetList = new ArrayList(); targetList new ArrayList() targetList.add(dataDecimalList.get(0).multiply(dataDecimalList.get(2))) targetList.add targetList dataDecimalList.get(0).multiply(dataDecimalList.get(2)) dataDecimalList.get(0).multiply dataDecimalList.get(0) dataDecimalList.get dataDecimalList 0 dataDecimalList.get(2) dataDecimalList.get dataDecimalList 2 targetList.add(dataDecimalList.get(0).multiply(dataDecimalList.get(3))) targetList.add targetList dataDecimalList.get(0).multiply(dataDecimalList.get(3)) dataDecimalList.get(0).multiply dataDecimalList.get(0) dataDecimalList.get dataDecimalList 0 dataDecimalList.get(3) dataDecimalList.get dataDecimalList 3 targetList.add(dataDecimalList.get(1).multiply(dataDecimalList.get(2))) targetList.add targetList dataDecimalList.get(1).multiply(dataDecimalList.get(2)) dataDecimalList.get(1).multiply dataDecimalList.get(1) dataDecimalList.get dataDecimalList 1 dataDecimalList.get(2) dataDecimalList.get dataDecimalList 2 targetList.add(dataDecimalList.get(1).multiply(dataDecimalList.get(3))) targetList.add targetList dataDecimalList.get(1).multiply(dataDecimalList.get(3)) dataDecimalList.get(1).multiply dataDecimalList.get(1) dataDecimalList.get dataDecimalList 1 dataDecimalList.get(3) dataDecimalList.get dataDecimalList 3 BigDecimal max = new BigDecimal("-1000000000000000000000000000000000000000000000000000000000000000000000000000"); max new BigDecimal("-1000000000000000000000000000000000000000000000000000000000000000000000000000") for(BigDecimal target: targetList){
            if(max.compareTo(target) == -1){
                max = target;
            }
        } BigDecimal target targetList {
            if(max.compareTo(target) == -1){
                max = target;
            }
        } {
            if(max.compareTo(target) == -1){
                max = target;
            }
        } if(max.compareTo(target) == -1){
                max = target;
            } max.compareTo(target) == -1 max.compareTo(target) max.compareTo max target -1 1 {
                max = target;
            } max = target max target 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) throws Exception {
        Scanner sc = new Scanner(System.in);
        String x = sc.nextLine();
        String[] data = x.split(" ");
        List<BigDecimal> dataDecimalList = new ArrayList();
        for(String a: data){
            BigDecimal bd = new BigDecimal(a);
            dataDecimalList.add(bd);
        }
        List<BigDecimal> targetList = new ArrayList();
        targetList.add(dataDecimalList.get(0).multiply(dataDecimalList.get(2)));
        targetList.add(dataDecimalList.get(0).multiply(dataDecimalList.get(3)));
        targetList.add(dataDecimalList.get(1).multiply(dataDecimalList.get(2)));
        targetList.add(dataDecimalList.get(1).multiply(dataDecimalList.get(3)));

        BigDecimal max = new BigDecimal("-1000000000000000000000000000000000000000000000000000000000000000000000000000");
        for(BigDecimal target: targetList){
            if(max.compareTo(target) == -1){
                max = target;
            }
        }
        System.out.println(max);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String x = sc.nextLine();
        String[] data = x.split(" ");
        List<BigDecimal> dataDecimalList = new ArrayList();
        for(String a: data){
            BigDecimal bd = new BigDecimal(a);
            dataDecimalList.add(bd);
        }
        List<BigDecimal> targetList = new ArrayList();
        targetList.add(dataDecimalList.get(0).multiply(dataDecimalList.get(2)));
        targetList.add(dataDecimalList.get(0).multiply(dataDecimalList.get(3)));
        targetList.add(dataDecimalList.get(1).multiply(dataDecimalList.get(2)));
        targetList.add(dataDecimalList.get(1).multiply(dataDecimalList.get(3)));

        BigDecimal max = new BigDecimal("-1000000000000000000000000000000000000000000000000000000000000000000000000000");
        for(BigDecimal target: targetList){
            if(max.compareTo(target) == -1){
                max = target;
            }
        }
        System.out.println(max);
    }
} Main

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String x = sc.nextLine();
        String[] data = x.split(" ");
        List<BigDecimal> dataDecimalList = new ArrayList();
        for(String a: data){
            BigDecimal bd = new BigDecimal(a);
            dataDecimalList.add(bd);
        }
        List<BigDecimal> targetList = new ArrayList();
        targetList.add(dataDecimalList.get(0).multiply(dataDecimalList.get(2)));
        targetList.add(dataDecimalList.get(0).multiply(dataDecimalList.get(3)));
        targetList.add(dataDecimalList.get(1).multiply(dataDecimalList.get(2)));
        targetList.add(dataDecimalList.get(1).multiply(dataDecimalList.get(3)));

        BigDecimal max = new BigDecimal("-1000000000000000000000000000000000000000000000000000000000000000000000000000");
        for(BigDecimal target: targetList){
            if(max.compareTo(target) == -1){
                max = target;
            }
        }
        System.out.println(max);
    }
}
