import java.util.*;

class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long a = sc.nextLong();
    long b = sc.nextLong();
    long c = sc.nextLong();
    long d = sc.nextLong();
    long[] array = {a * c, a * d, b * c, b * d};
    long max = array[0];
    for(int i = 1; i < array.length; i++) {
      if (max < array[i]) {
          max = array[i];
      }
    }
    System.out.println(max);
  }
} import java.util.*; util.* java class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long a = sc.nextLong();
    long b = sc.nextLong();
    long c = sc.nextLong();
    long d = sc.nextLong();
    long[] array = {a * c, a * d, b * c, b * d};
    long max = array[0];
    for(int i = 1; i < array.length; i++) {
      if (max < array[i]) {
          max = array[i];
      }
    }
    System.out.println(max);
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long a = sc.nextLong();
    long b = sc.nextLong();
    long c = sc.nextLong();
    long d = sc.nextLong();
    long[] array = {a * c, a * d, b * c, b * d};
    long max = array[0];
    for(int i = 1; i < array.length; i++) {
      if (max < array[i]) {
          max = array[i];
      }
    }
    System.out.println(max);
  } main {
    Scanner sc = new Scanner(System.in);
    long a = sc.nextLong();
    long b = sc.nextLong();
    long c = sc.nextLong();
    long d = sc.nextLong();
    long[] array = {a * c, a * d, b * c, b * d};
    long max = array[0];
    for(int i = 1; i < array.length; i++) {
      if (max < array[i]) {
          max = array[i];
      }
    }
    System.out.println(max);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long a = sc.nextLong(); a sc.nextLong() sc.nextLong sc long b = sc.nextLong(); b sc.nextLong() sc.nextLong sc long c = sc.nextLong(); c sc.nextLong() sc.nextLong sc long d = sc.nextLong(); d sc.nextLong() sc.nextLong sc long[] array = {a * c, a * d, b * c, b * d}; array {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 = array[0]; max array[0] array 0 for(int i = 1; i < array.length; i++) {
      if (max < array[i]) {
          max = array[i];
      }
    } int i = 1; int i = 1; i 1 i < array.length i array.length array array.length i++ i++ i {
      if (max < array[i]) {
          max = array[i];
      }
    } {
      if (max < array[i]) {
          max = array[i];
      }
    } if (max < array[i]) {
          max = array[i];
      } max < array[i] max array[i] array i {
          max = array[i];
      } max = array[i] max array[i] array i System.out.println(max) System.out.println System.out System System.out max String[] args args
import java.util.*;

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