import java.util.Scanner;
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[] s = new long[4];
    s[0] = a*c;
    s[1] = a*d;
    s[2] = b*c;
    s[3] = b*d;

    long ans = s[0];
    for(int i = 0; i < 4; i++) {
      if(ans < s[i]) ans = s[i];
    }

    System.out.println(ans);
  }
} import java.util.Scanner; Scanner java.util 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[] s = new long[4];
    s[0] = a*c;
    s[1] = a*d;
    s[2] = b*c;
    s[3] = b*d;

    long ans = s[0];
    for(int i = 0; i < 4; i++) {
      if(ans < s[i]) ans = s[i];
    }

    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[] s = new long[4];
    s[0] = a*c;
    s[1] = a*d;
    s[2] = b*c;
    s[3] = b*d;

    long ans = s[0];
    for(int i = 0; i < 4; i++) {
      if(ans < s[i]) ans = s[i];
    }

    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[] s = new long[4];
    s[0] = a*c;
    s[1] = a*d;
    s[2] = b*c;
    s[3] = b*d;

    long ans = s[0];
    for(int i = 0; i < 4; i++) {
      if(ans < s[i]) ans = s[i];
    }

    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[] s = new long[4]; s new long[4] 4 s[0] = a*c s[0] s 0 a*c a c s[1] = a*d s[1] s 1 a*d a d s[2] = b*c s[2] s 2 b*c b c s[3] = b*d s[3] s 3 b*d b d long ans = s[0]; ans s[0] s 0 for(int i = 0; i < 4; i++) {
      if(ans < s[i]) ans = s[i];
    } int i = 0; int i = 0; i 0 i < 4 i 4 i++ i++ i {
      if(ans < s[i]) ans = s[i];
    } {
      if(ans < s[i]) ans = s[i];
    } if(ans < s[i]) ans = s[i]; ans < s[i] ans s[i] s i ans = s[i] ans s[i] s i System.out.println(ans) System.out.println System.out System System.out ans String[] args args
import java.util.Scanner;
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[] s = new long[4];
    s[0] = a*c;
    s[1] = a*d;
    s[2] = b*c;
    s[3] = b*d;

    long ans = s[0];
    for(int i = 0; i < 4; i++) {
      if(ans < s[i]) ans = s[i];
    }

    System.out.println(ans);
  }
}
