import 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 currentMax = -9223372036854775807L;

      if (a*c > currentMax) {
        currentMax = a*c;
      }

      if (a*d > currentMax) {
        currentMax = a*d;
      }

      if (b*c > currentMax) {
        currentMax = b*c;
      }

      if (b*d > currentMax) {
        currentMax = b*d;
      }

      System.out.println(currentMax);
    }
} import java.util.*; util.* java 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 currentMax = -9223372036854775807L;

      if (a*c > currentMax) {
        currentMax = a*c;
      }

      if (a*d > currentMax) {
        currentMax = a*d;
      }

      if (b*c > currentMax) {
        currentMax = b*c;
      }

      if (b*d > currentMax) {
        currentMax = b*d;
      }

      System.out.println(currentMax);
    }
} 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 currentMax = -9223372036854775807L;

      if (a*c > currentMax) {
        currentMax = a*c;
      }

      if (a*d > currentMax) {
        currentMax = a*d;
      }

      if (b*c > currentMax) {
        currentMax = b*c;
      }

      if (b*d > currentMax) {
        currentMax = b*d;
      }

      System.out.println(currentMax);
    } main {
      Scanner sc = new Scanner(System.in);
      long a = sc.nextInt();
      long b = sc.nextInt();
      long c = sc.nextInt();
      long d = sc.nextInt();
      
      long currentMax = -9223372036854775807L;

      if (a*c > currentMax) {
        currentMax = a*c;
      }

      if (a*d > currentMax) {
        currentMax = a*d;
      }

      if (b*c > currentMax) {
        currentMax = b*c;
      }

      if (b*d > currentMax) {
        currentMax = b*d;
      }

      System.out.println(currentMax);
    } 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 currentMax = -9223372036854775807L; currentMax -9223372036854775807L 9223372036854775807L if (a*c > currentMax) {
        currentMax = a*c;
      } a*c > currentMax a*c a c currentMax {
        currentMax = a*c;
      } currentMax = a*c currentMax a*c a c if (a*d > currentMax) {
        currentMax = a*d;
      } a*d > currentMax a*d a d currentMax {
        currentMax = a*d;
      } currentMax = a*d currentMax a*d a d if (b*c > currentMax) {
        currentMax = b*c;
      } b*c > currentMax b*c b c currentMax {
        currentMax = b*c;
      } currentMax = b*c currentMax b*c b c if (b*d > currentMax) {
        currentMax = b*d;
      } b*d > currentMax b*d b d currentMax {
        currentMax = b*d;
      } currentMax = b*d currentMax b*d b d System.out.println(currentMax) System.out.println System.out System System.out currentMax String[] args args
import 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 currentMax = -9223372036854775807L;

      if (a*c > currentMax) {
        currentMax = a*c;
      }

      if (a*d > currentMax) {
        currentMax = a*d;
      }

      if (b*c > currentMax) {
        currentMax = b*c;
      }

      if (b*d > currentMax) {
        currentMax = b*d;
      }

      System.out.println(currentMax);
    }
}