import java.util.Scanner;
//atcoderはScannerクラスのsc.next()で行ける
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextInt();
        long b = sc.nextInt();
        long c = sc.nextInt();
        long d = sc.nextInt();

        long[] ab = new long[]{a,b};
        long[] cd = new long[]{c,d};
        long ans = Long.MIN_VALUE;
        for (long i : ab){
            for (long j : cd){
                if (ans<i*j){
                    ans=i*j;
                }
            }
        }
        System.out.println(ans);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextInt();
        long b = sc.nextInt();
        long c = sc.nextInt();
        long d = sc.nextInt();

        long[] ab = new long[]{a,b};
        long[] cd = new long[]{c,d};
        long ans = Long.MIN_VALUE;
        for (long i : ab){
            for (long j : cd){
                if (ans<i*j){
                    ans=i*j;
                }
            }
        }
        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextInt();
        long b = sc.nextInt();
        long c = sc.nextInt();
        long d = sc.nextInt();

        long[] ab = new long[]{a,b};
        long[] cd = new long[]{c,d};
        long ans = Long.MIN_VALUE;
        for (long i : ab){
            for (long j : cd){
                if (ans<i*j){
                    ans=i*j;
                }
            }
        }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextInt();
        long b = sc.nextInt();
        long c = sc.nextInt();
        long d = sc.nextInt();

        long[] ab = new long[]{a,b};
        long[] cd = new long[]{c,d};
        long ans = Long.MIN_VALUE;
        for (long i : ab){
            for (long j : cd){
                if (ans<i*j){
                    ans=i*j;
                }
            }
        }
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long a = sc.nextInt(); a sc.nextInt() sc.nextInt sc long b = sc.nextInt(); b sc.nextInt() sc.nextInt sc long c = sc.nextInt(); c sc.nextInt() sc.nextInt sc long d = sc.nextInt(); d sc.nextInt() sc.nextInt sc long[] ab = new long[]{a,b}; ab new long[]{a,b} long[] cd = new long[]{c,d}; cd new long[]{c,d} long ans = Long.MIN_VALUE; ans Long.MIN_VALUE Long Long.MIN_VALUE for (long i : ab){
            for (long j : cd){
                if (ans<i*j){
                    ans=i*j;
                }
            }
        } long i ab {
            for (long j : cd){
                if (ans<i*j){
                    ans=i*j;
                }
            }
        } {
            for (long j : cd){
                if (ans<i*j){
                    ans=i*j;
                }
            }
        } for (long j : cd){
                if (ans<i*j){
                    ans=i*j;
                }
            } long j cd {
                if (ans<i*j){
                    ans=i*j;
                }
            } {
                if (ans<i*j){
                    ans=i*j;
                }
            } if (ans<i*j){
                    ans=i*j;
                } ans<i*j ans i*j i j {
                    ans=i*j;
                } ans=i*j ans i*j i j System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextInt();
        long b = sc.nextInt();
        long c = sc.nextInt();
        long d = sc.nextInt();

        long[] ab = new long[]{a,b};
        long[] cd = new long[]{c,d};
        long ans = Long.MIN_VALUE;
        for (long i : ab){
            for (long j : cd){
                if (ans<i*j){
                    ans=i*j;
                }
            }
        }
        System.out.println(ans);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextInt();
        long b = sc.nextInt();
        long c = sc.nextInt();
        long d = sc.nextInt();

        long[] ab = new long[]{a,b};
        long[] cd = new long[]{c,d};
        long ans = Long.MIN_VALUE;
        for (long i : ab){
            for (long j : cd){
                if (ans<i*j){
                    ans=i*j;
                }
            }
        }
        System.out.println(ans);
    }
} Main
import java.util.Scanner;
//atcoderはScannerクラスのsc.next()で行ける
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextInt();
        long b = sc.nextInt();
        long c = sc.nextInt();
        long d = sc.nextInt();

        long[] ab = new long[]{a,b};
        long[] cd = new long[]{c,d};
        long ans = Long.MIN_VALUE;
        for (long i : ab){
            for (long j : cd){
                if (ans<i*j){
                    ans=i*j;
                }
            }
        }
        System.out.println(ans);
    }
}