
import java.util.*;
import java.io.*;

/**
 * Made by egor https://github.com/chermehdi/egor.
 * 
 * @author Azuz
 * 
 */
public class Main {

    void solve(Scanner in, PrintWriter out) {
      long[] a = new long[2];
      long[] b = new long[2];


      a[0] = in.nextInt();
      a[1] = in.nextInt();
      b[0] = in.nextInt();
      b[1] = in.nextInt();

      long ans = Long.MIN_VALUE;
      for (int i = 0; i < 2; ++i) {
        for (int j = 0; j < 2; ++j) {
          ans = Math.max(ans, a[i] * b[j]);

        }
      }

      out.println(ans);
    }

    public static void main(String[] args) {
        try(Scanner in = new Scanner(System.in);
            PrintWriter out = new PrintWriter(System.out)) {
            new Main().solve(in, out);
        }
    }
} import java.util.*; util.* java import java.io.*; io.* java public class Main {

    void solve(Scanner in, PrintWriter out) {
      long[] a = new long[2];
      long[] b = new long[2];


      a[0] = in.nextInt();
      a[1] = in.nextInt();
      b[0] = in.nextInt();
      b[1] = in.nextInt();

      long ans = Long.MIN_VALUE;
      for (int i = 0; i < 2; ++i) {
        for (int j = 0; j < 2; ++j) {
          ans = Math.max(ans, a[i] * b[j]);

        }
      }

      out.println(ans);
    }

    public static void main(String[] args) {
        try(Scanner in = new Scanner(System.in);
            PrintWriter out = new PrintWriter(System.out)) {
            new Main().solve(in, out);
        }
    }
} Main void solve(Scanner in, PrintWriter out) {
      long[] a = new long[2];
      long[] b = new long[2];


      a[0] = in.nextInt();
      a[1] = in.nextInt();
      b[0] = in.nextInt();
      b[1] = in.nextInt();

      long ans = Long.MIN_VALUE;
      for (int i = 0; i < 2; ++i) {
        for (int j = 0; j < 2; ++j) {
          ans = Math.max(ans, a[i] * b[j]);

        }
      }

      out.println(ans);
    } solve {
      long[] a = new long[2];
      long[] b = new long[2];


      a[0] = in.nextInt();
      a[1] = in.nextInt();
      b[0] = in.nextInt();
      b[1] = in.nextInt();

      long ans = Long.MIN_VALUE;
      for (int i = 0; i < 2; ++i) {
        for (int j = 0; j < 2; ++j) {
          ans = Math.max(ans, a[i] * b[j]);

        }
      }

      out.println(ans);
    } long[] a = new long[2]; a new long[2] 2 long[] b = new long[2]; b new long[2] 2 a[0] = in.nextInt() a[0] a 0 in.nextInt() in.nextInt in a[1] = in.nextInt() a[1] a 1 in.nextInt() in.nextInt in b[0] = in.nextInt() b[0] b 0 in.nextInt() in.nextInt in b[1] = in.nextInt() b[1] b 1 in.nextInt() in.nextInt in long ans = Long.MIN_VALUE; ans Long.MIN_VALUE Long Long.MIN_VALUE for (int i = 0; i < 2; ++i) {
        for (int j = 0; j < 2; ++j) {
          ans = Math.max(ans, a[i] * b[j]);

        }
      } int i = 0; int i = 0; i 0 i < 2 i 2 ++i ++i i {
        for (int j = 0; j < 2; ++j) {
          ans = Math.max(ans, a[i] * b[j]);

        }
      } {
        for (int j = 0; j < 2; ++j) {
          ans = Math.max(ans, a[i] * b[j]);

        }
      } for (int j = 0; j < 2; ++j) {
          ans = Math.max(ans, a[i] * b[j]);

        } int j = 0; int j = 0; j 0 j < 2 j 2 ++j ++j j {
          ans = Math.max(ans, a[i] * b[j]);

        } {
          ans = Math.max(ans, a[i] * b[j]);

        } ans = Math.max(ans, a[i] * b[j]) ans Math.max(ans, a[i] * b[j]) Math.max Math ans a[i] * b[j] a[i] a i b[j] b j out.println(ans) out.println out ans Scanner in in PrintWriter out out public static void main(String[] args) {
        try(Scanner in = new Scanner(System.in);
            PrintWriter out = new PrintWriter(System.out)) {
            new Main().solve(in, out);
        }
    } main {
        try(Scanner in = new Scanner(System.in);
            PrintWriter out = new PrintWriter(System.out)) {
            new Main().solve(in, out);
        }
    } try(Scanner in = new Scanner(System.in);
            PrintWriter out = new PrintWriter(System.out)) {
            new Main().solve(in, out);
        } {
            new Main().solve(in, out);
        } Scanner in = new Scanner(System.in) Scanner in = new Scanner(System.in) new Scanner(System.in) PrintWriter out = new PrintWriter(System.out) PrintWriter out = new PrintWriter(System.out) new PrintWriter(System.out) new Main().solve(in, out) new Main().solve new Main() in out String[] args args public class Main {

    void solve(Scanner in, PrintWriter out) {
      long[] a = new long[2];
      long[] b = new long[2];


      a[0] = in.nextInt();
      a[1] = in.nextInt();
      b[0] = in.nextInt();
      b[1] = in.nextInt();

      long ans = Long.MIN_VALUE;
      for (int i = 0; i < 2; ++i) {
        for (int j = 0; j < 2; ++j) {
          ans = Math.max(ans, a[i] * b[j]);

        }
      }

      out.println(ans);
    }

    public static void main(String[] args) {
        try(Scanner in = new Scanner(System.in);
            PrintWriter out = new PrintWriter(System.out)) {
            new Main().solve(in, out);
        }
    }
} public class Main {

    void solve(Scanner in, PrintWriter out) {
      long[] a = new long[2];
      long[] b = new long[2];


      a[0] = in.nextInt();
      a[1] = in.nextInt();
      b[0] = in.nextInt();
      b[1] = in.nextInt();

      long ans = Long.MIN_VALUE;
      for (int i = 0; i < 2; ++i) {
        for (int j = 0; j < 2; ++j) {
          ans = Math.max(ans, a[i] * b[j]);

        }
      }

      out.println(ans);
    }

    public static void main(String[] args) {
        try(Scanner in = new Scanner(System.in);
            PrintWriter out = new PrintWriter(System.out)) {
            new Main().solve(in, out);
        }
    }
} Main

import java.util.*;
import java.io.*;

/**
 * Made by egor https://github.com/chermehdi/egor.
 * 
 * @author Azuz
 * 
 */
public class Main {

    void solve(Scanner in, PrintWriter out) {
      long[] a = new long[2];
      long[] b = new long[2];


      a[0] = in.nextInt();
      a[1] = in.nextInt();
      b[0] = in.nextInt();
      b[1] = in.nextInt();

      long ans = Long.MIN_VALUE;
      for (int i = 0; i < 2; ++i) {
        for (int j = 0; j < 2; ++j) {
          ans = Math.max(ans, a[i] * b[j]);

        }
      }

      out.println(ans);
    }

    public static void main(String[] args) {
        try(Scanner in = new Scanner(System.in);
            PrintWriter out = new PrintWriter(System.out)) {
            new Main().solve(in, out);
        }
    }
}
