import java.math.BigInteger;
import java.util.Scanner;

public 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();

    BigInteger ac = BigInteger.valueOf(a * c);
    BigInteger ad = BigInteger.valueOf(a * d);
    BigInteger bc = BigInteger.valueOf(b * c);
    BigInteger bd = BigInteger.valueOf(b * d);

    System.out.println(ac.max(ad).max(bc).max(bd));
  }
} import java.math.BigInteger; BigInteger java.math import java.util.Scanner; Scanner java.util public 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();

    BigInteger ac = BigInteger.valueOf(a * c);
    BigInteger ad = BigInteger.valueOf(a * d);
    BigInteger bc = BigInteger.valueOf(b * c);
    BigInteger bd = BigInteger.valueOf(b * d);

    System.out.println(ac.max(ad).max(bc).max(bd));
  }
} 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();

    BigInteger ac = BigInteger.valueOf(a * c);
    BigInteger ad = BigInteger.valueOf(a * d);
    BigInteger bc = BigInteger.valueOf(b * c);
    BigInteger bd = BigInteger.valueOf(b * d);

    System.out.println(ac.max(ad).max(bc).max(bd));
  } main {
    Scanner sc = new Scanner(System.in);
    long a = sc.nextInt();
    long b = sc.nextInt();
    long c = sc.nextInt();
    long d = sc.nextInt();

    BigInteger ac = BigInteger.valueOf(a * c);
    BigInteger ad = BigInteger.valueOf(a * d);
    BigInteger bc = BigInteger.valueOf(b * c);
    BigInteger bd = BigInteger.valueOf(b * d);

    System.out.println(ac.max(ad).max(bc).max(bd));
  } 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 BigInteger ac = BigInteger.valueOf(a * c); ac BigInteger.valueOf(a * c) BigInteger.valueOf BigInteger a * c a c BigInteger ad = BigInteger.valueOf(a * d); ad BigInteger.valueOf(a * d) BigInteger.valueOf BigInteger a * d a d BigInteger bc = BigInteger.valueOf(b * c); bc BigInteger.valueOf(b * c) BigInteger.valueOf BigInteger b * c b c BigInteger bd = BigInteger.valueOf(b * d); bd BigInteger.valueOf(b * d) BigInteger.valueOf BigInteger b * d b d System.out.println(ac.max(ad).max(bc).max(bd)) System.out.println System.out System System.out ac.max(ad).max(bc).max(bd) ac.max(ad).max(bc).max ac.max(ad).max(bc) ac.max(ad).max ac.max(ad) ac.max ac ad bc bd String[] args args public 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();

    BigInteger ac = BigInteger.valueOf(a * c);
    BigInteger ad = BigInteger.valueOf(a * d);
    BigInteger bc = BigInteger.valueOf(b * c);
    BigInteger bd = BigInteger.valueOf(b * d);

    System.out.println(ac.max(ad).max(bc).max(bd));
  }
} public 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();

    BigInteger ac = BigInteger.valueOf(a * c);
    BigInteger ad = BigInteger.valueOf(a * d);
    BigInteger bc = BigInteger.valueOf(b * c);
    BigInteger bd = BigInteger.valueOf(b * d);

    System.out.println(ac.max(ad).max(bc).max(bd));
  }
} Main
import java.math.BigInteger;
import java.util.Scanner;

public 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();

    BigInteger ac = BigInteger.valueOf(a * c);
    BigInteger ad = BigInteger.valueOf(a * d);
    BigInteger bc = BigInteger.valueOf(b * c);
    BigInteger bd = BigInteger.valueOf(b * d);

    System.out.println(ac.max(ad).max(bc).max(bd));
  }
}
