import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        try (Scanner scanner = new Scanner(System.in);) {
            long a = scanner.nextLong();
            long b = scanner.nextLong();
            long c = scanner.nextLong();
            long d = scanner.nextLong();
            long[] ary = {a * c, a * d, b * c, b * d};
            long max = ary[0];

            for (int i = 1; i < ary.length; i++) {
                if (ary[i] > max) {
                    max = ary[i];
                }
            }
            
            System.out.println(max);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        try (Scanner scanner = new Scanner(System.in);) {
            long a = scanner.nextLong();
            long b = scanner.nextLong();
            long c = scanner.nextLong();
            long d = scanner.nextLong();
            long[] ary = {a * c, a * d, b * c, b * d};
            long max = ary[0];

            for (int i = 1; i < ary.length; i++) {
                if (ary[i] > max) {
                    max = ary[i];
                }
            }
            
            System.out.println(max);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
} Main public static void main(String[] args) {
        try (Scanner scanner = new Scanner(System.in);) {
            long a = scanner.nextLong();
            long b = scanner.nextLong();
            long c = scanner.nextLong();
            long d = scanner.nextLong();
            long[] ary = {a * c, a * d, b * c, b * d};
            long max = ary[0];

            for (int i = 1; i < ary.length; i++) {
                if (ary[i] > max) {
                    max = ary[i];
                }
            }
            
            System.out.println(max);
        } catch (Exception e) {
            e.printStackTrace();
        }
    } main {
        try (Scanner scanner = new Scanner(System.in);) {
            long a = scanner.nextLong();
            long b = scanner.nextLong();
            long c = scanner.nextLong();
            long d = scanner.nextLong();
            long[] ary = {a * c, a * d, b * c, b * d};
            long max = ary[0];

            for (int i = 1; i < ary.length; i++) {
                if (ary[i] > max) {
                    max = ary[i];
                }
            }
            
            System.out.println(max);
        } catch (Exception e) {
            e.printStackTrace();
        }
    } try (Scanner scanner = new Scanner(System.in);) {
            long a = scanner.nextLong();
            long b = scanner.nextLong();
            long c = scanner.nextLong();
            long d = scanner.nextLong();
            long[] ary = {a * c, a * d, b * c, b * d};
            long max = ary[0];

            for (int i = 1; i < ary.length; i++) {
                if (ary[i] > max) {
                    max = ary[i];
                }
            }
            
            System.out.println(max);
        } catch (Exception e) {
            e.printStackTrace();
        } catch (Exception e) {
            e.printStackTrace();
        } Exception e {
            e.printStackTrace();
        } e.printStackTrace() e.printStackTrace e {
            long a = scanner.nextLong();
            long b = scanner.nextLong();
            long c = scanner.nextLong();
            long d = scanner.nextLong();
            long[] ary = {a * c, a * d, b * c, b * d};
            long max = ary[0];

            for (int i = 1; i < ary.length; i++) {
                if (ary[i] > max) {
                    max = ary[i];
                }
            }
            
            System.out.println(max);
        } Scanner scanner = new Scanner(System.in) Scanner scanner = new Scanner(System.in) new Scanner(System.in) long a = scanner.nextLong(); a scanner.nextLong() scanner.nextLong scanner long b = scanner.nextLong(); b scanner.nextLong() scanner.nextLong scanner long c = scanner.nextLong(); c scanner.nextLong() scanner.nextLong scanner long d = scanner.nextLong(); d scanner.nextLong() scanner.nextLong scanner long[] ary = {a * c, a * d, b * c, b * d}; ary {a * c, a * d, b * c, b * d} a * c a c a * d a d b * c b c b * d b d long max = ary[0]; max ary[0] ary 0 for (int i = 1; i < ary.length; i++) {
                if (ary[i] > max) {
                    max = ary[i];
                }
            } int i = 1; int i = 1; i 1 i < ary.length i ary.length ary ary.length i++ i++ i {
                if (ary[i] > max) {
                    max = ary[i];
                }
            } {
                if (ary[i] > max) {
                    max = ary[i];
                }
            } if (ary[i] > max) {
                    max = ary[i];
                } ary[i] > max ary[i] ary i max {
                    max = ary[i];
                } max = ary[i] max ary[i] ary i 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) {
        try (Scanner scanner = new Scanner(System.in);) {
            long a = scanner.nextLong();
            long b = scanner.nextLong();
            long c = scanner.nextLong();
            long d = scanner.nextLong();
            long[] ary = {a * c, a * d, b * c, b * d};
            long max = ary[0];

            for (int i = 1; i < ary.length; i++) {
                if (ary[i] > max) {
                    max = ary[i];
                }
            }
            
            System.out.println(max);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
} public class Main {
    public static void main(String[] args) {
        try (Scanner scanner = new Scanner(System.in);) {
            long a = scanner.nextLong();
            long b = scanner.nextLong();
            long c = scanner.nextLong();
            long d = scanner.nextLong();
            long[] ary = {a * c, a * d, b * c, b * d};
            long max = ary[0];

            for (int i = 1; i < ary.length; i++) {
                if (ary[i] > max) {
                    max = ary[i];
                }
            }
            
            System.out.println(max);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        try (Scanner scanner = new Scanner(System.in);) {
            long a = scanner.nextLong();
            long b = scanner.nextLong();
            long c = scanner.nextLong();
            long d = scanner.nextLong();
            long[] ary = {a * c, a * d, b * c, b * d};
            long max = ary[0];

            for (int i = 1; i < ary.length; i++) {
                if (ary[i] > max) {
                    max = ary[i];
                }
            }
            
            System.out.println(max);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}