import java.util.Scanner;

/**
 * Created by enpingkuang on 2020/9/13 8:01 下午
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long[] a = new long[4];
        long sum = Long.MIN_VALUE;
        for(int i = 0;i<4;i++){
            a[i] = scanner.nextLong();
        }
        sum = Math.max(sum,a[0]*a[2]);
        sum = Math.max(sum,a[0]*a[3]);
        sum = Math.max(sum,a[1]*a[2]);
        sum = Math.max(sum,a[1]*a[3]);
        System.out.println(sum);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long[] a = new long[4];
        long sum = Long.MIN_VALUE;
        for(int i = 0;i<4;i++){
            a[i] = scanner.nextLong();
        }
        sum = Math.max(sum,a[0]*a[2]);
        sum = Math.max(sum,a[0]*a[3]);
        sum = Math.max(sum,a[1]*a[2]);
        sum = Math.max(sum,a[1]*a[3]);
        System.out.println(sum);
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long[] a = new long[4];
        long sum = Long.MIN_VALUE;
        for(int i = 0;i<4;i++){
            a[i] = scanner.nextLong();
        }
        sum = Math.max(sum,a[0]*a[2]);
        sum = Math.max(sum,a[0]*a[3]);
        sum = Math.max(sum,a[1]*a[2]);
        sum = Math.max(sum,a[1]*a[3]);
        System.out.println(sum);
    } main {
        Scanner scanner = new Scanner(System.in);
        long[] a = new long[4];
        long sum = Long.MIN_VALUE;
        for(int i = 0;i<4;i++){
            a[i] = scanner.nextLong();
        }
        sum = Math.max(sum,a[0]*a[2]);
        sum = Math.max(sum,a[0]*a[3]);
        sum = Math.max(sum,a[1]*a[2]);
        sum = Math.max(sum,a[1]*a[3]);
        System.out.println(sum);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) long[] a = new long[4]; a new long[4] 4 long sum = Long.MIN_VALUE; sum Long.MIN_VALUE Long Long.MIN_VALUE for(int i = 0;i<4;i++){
            a[i] = scanner.nextLong();
        } int i = 0; int i = 0; i 0 i<4 i 4 i++ i++ i {
            a[i] = scanner.nextLong();
        } {
            a[i] = scanner.nextLong();
        } a[i] = scanner.nextLong() a[i] a i scanner.nextLong() scanner.nextLong scanner sum = Math.max(sum,a[0]*a[2]) sum Math.max(sum,a[0]*a[2]) Math.max Math sum a[0]*a[2] a[0] a 0 a[2] a 2 sum = Math.max(sum,a[0]*a[3]) sum Math.max(sum,a[0]*a[3]) Math.max Math sum a[0]*a[3] a[0] a 0 a[3] a 3 sum = Math.max(sum,a[1]*a[2]) sum Math.max(sum,a[1]*a[2]) Math.max Math sum a[1]*a[2] a[1] a 1 a[2] a 2 sum = Math.max(sum,a[1]*a[3]) sum Math.max(sum,a[1]*a[3]) Math.max Math sum a[1]*a[3] a[1] a 1 a[3] a 3 System.out.println(sum) System.out.println System.out System System.out sum String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long[] a = new long[4];
        long sum = Long.MIN_VALUE;
        for(int i = 0;i<4;i++){
            a[i] = scanner.nextLong();
        }
        sum = Math.max(sum,a[0]*a[2]);
        sum = Math.max(sum,a[0]*a[3]);
        sum = Math.max(sum,a[1]*a[2]);
        sum = Math.max(sum,a[1]*a[3]);
        System.out.println(sum);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long[] a = new long[4];
        long sum = Long.MIN_VALUE;
        for(int i = 0;i<4;i++){
            a[i] = scanner.nextLong();
        }
        sum = Math.max(sum,a[0]*a[2]);
        sum = Math.max(sum,a[0]*a[3]);
        sum = Math.max(sum,a[1]*a[2]);
        sum = Math.max(sum,a[1]*a[3]);
        System.out.println(sum);
    }
} Main
import java.util.Scanner;

/**
 * Created by enpingkuang on 2020/9/13 8:01 下午
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long[] a = new long[4];
        long sum = Long.MIN_VALUE;
        for(int i = 0;i<4;i++){
            a[i] = scanner.nextLong();
        }
        sum = Math.max(sum,a[0]*a[2]);
        sum = Math.max(sum,a[0]*a[3]);
        sum = Math.max(sum,a[1]*a[2]);
        sum = Math.max(sum,a[1]*a[3]);
        System.out.println(sum);
    }
}