import java.util.*;

/**
 * B Main
 *
 * @date 2020.09.19
 * @author 焼き鮭 <yaki-shake@up-tri.me>
 */

public class Main {
  Scanner sc;

  public static void main(String[] args) {
    new Main().execute();
  }

  public void execute() {
    this.sc = new Scanner(System.in);
    long a = this.sc.nextInt();
    long b = this.sc.nextInt();
    long c = this.sc.nextInt();
    long d = this.sc.nextInt();

    long[] p = new long[4];
    p[0] = a * c;
    p[1] = b * c;
    p[2] = a * d;
    p[3] = b * d;

    Arrays.sort(p);
    System.out.println(p[3]);
  }
} import java.util.*; util.* java public class Main {
  Scanner sc;

  public static void main(String[] args) {
    new Main().execute();
  }

  public void execute() {
    this.sc = new Scanner(System.in);
    long a = this.sc.nextInt();
    long b = this.sc.nextInt();
    long c = this.sc.nextInt();
    long d = this.sc.nextInt();

    long[] p = new long[4];
    p[0] = a * c;
    p[1] = b * c;
    p[2] = a * d;
    p[3] = b * d;

    Arrays.sort(p);
    System.out.println(p[3]);
  }
} Main Scanner sc; sc public static void main(String[] args) {
    new Main().execute();
  } main {
    new Main().execute();
  } new Main().execute() new Main().execute new Main() String[] args args public void execute() {
    this.sc = new Scanner(System.in);
    long a = this.sc.nextInt();
    long b = this.sc.nextInt();
    long c = this.sc.nextInt();
    long d = this.sc.nextInt();

    long[] p = new long[4];
    p[0] = a * c;
    p[1] = b * c;
    p[2] = a * d;
    p[3] = b * d;

    Arrays.sort(p);
    System.out.println(p[3]);
  } execute {
    this.sc = new Scanner(System.in);
    long a = this.sc.nextInt();
    long b = this.sc.nextInt();
    long c = this.sc.nextInt();
    long d = this.sc.nextInt();

    long[] p = new long[4];
    p[0] = a * c;
    p[1] = b * c;
    p[2] = a * d;
    p[3] = b * d;

    Arrays.sort(p);
    System.out.println(p[3]);
  } this.sc = new Scanner(System.in) this.sc this this.sc new Scanner(System.in) long a = this.sc.nextInt(); a this.sc.nextInt() this.sc.nextInt this.sc this this.sc long b = this.sc.nextInt(); b this.sc.nextInt() this.sc.nextInt this.sc this this.sc long c = this.sc.nextInt(); c this.sc.nextInt() this.sc.nextInt this.sc this this.sc long d = this.sc.nextInt(); d this.sc.nextInt() this.sc.nextInt this.sc this this.sc long[] p = new long[4]; p new long[4] 4 p[0] = a * c p[0] p 0 a * c a c p[1] = b * c p[1] p 1 b * c b c p[2] = a * d p[2] p 2 a * d a d p[3] = b * d p[3] p 3 b * d b d Arrays.sort(p) Arrays.sort Arrays p System.out.println(p[3]) System.out.println System.out System System.out p[3] p 3 public class Main {
  Scanner sc;

  public static void main(String[] args) {
    new Main().execute();
  }

  public void execute() {
    this.sc = new Scanner(System.in);
    long a = this.sc.nextInt();
    long b = this.sc.nextInt();
    long c = this.sc.nextInt();
    long d = this.sc.nextInt();

    long[] p = new long[4];
    p[0] = a * c;
    p[1] = b * c;
    p[2] = a * d;
    p[3] = b * d;

    Arrays.sort(p);
    System.out.println(p[3]);
  }
} public class Main {
  Scanner sc;

  public static void main(String[] args) {
    new Main().execute();
  }

  public void execute() {
    this.sc = new Scanner(System.in);
    long a = this.sc.nextInt();
    long b = this.sc.nextInt();
    long c = this.sc.nextInt();
    long d = this.sc.nextInt();

    long[] p = new long[4];
    p[0] = a * c;
    p[1] = b * c;
    p[2] = a * d;
    p[3] = b * d;

    Arrays.sort(p);
    System.out.println(p[3]);
  }
} Main
import java.util.*;

/**
 * B Main
 *
 * @date 2020.09.19
 * @author 焼き鮭 <yaki-shake@up-tri.me>
 */

public class Main {
  Scanner sc;

  public static void main(String[] args) {
    new Main().execute();
  }

  public void execute() {
    this.sc = new Scanner(System.in);
    long a = this.sc.nextInt();
    long b = this.sc.nextInt();
    long c = this.sc.nextInt();
    long d = this.sc.nextInt();

    long[] p = new long[4];
    p[0] = a * c;
    p[1] = b * c;
    p[2] = a * d;
    p[3] = b * d;

    Arrays.sort(p);
    System.out.println(p[3]);
  }
}
