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.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long d = sc.nextLong();

        BigInteger ac = BigInteger.valueOf(a).multiply(BigInteger.valueOf(c));
        BigInteger ad = BigInteger.valueOf(a).multiply(BigInteger.valueOf(d));

        BigInteger result1 = ac.max(ad);

        BigInteger bc = BigInteger.valueOf(b).multiply(BigInteger.valueOf(c));
        BigInteger bd = BigInteger.valueOf(b).multiply(BigInteger.valueOf(d));

        BigInteger result2 = bc.max(bd);

        System.out.println(result1.max(result2));

    }
} 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.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long d = sc.nextLong();

        BigInteger ac = BigInteger.valueOf(a).multiply(BigInteger.valueOf(c));
        BigInteger ad = BigInteger.valueOf(a).multiply(BigInteger.valueOf(d));

        BigInteger result1 = ac.max(ad);

        BigInteger bc = BigInteger.valueOf(b).multiply(BigInteger.valueOf(c));
        BigInteger bd = BigInteger.valueOf(b).multiply(BigInteger.valueOf(d));

        BigInteger result2 = bc.max(bd);

        System.out.println(result1.max(result2));

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

        BigInteger ac = BigInteger.valueOf(a).multiply(BigInteger.valueOf(c));
        BigInteger ad = BigInteger.valueOf(a).multiply(BigInteger.valueOf(d));

        BigInteger result1 = ac.max(ad);

        BigInteger bc = BigInteger.valueOf(b).multiply(BigInteger.valueOf(c));
        BigInteger bd = BigInteger.valueOf(b).multiply(BigInteger.valueOf(d));

        BigInteger result2 = bc.max(bd);

        System.out.println(result1.max(result2));

    } main {

        Scanner sc = new Scanner(System.in);
        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long d = sc.nextLong();

        BigInteger ac = BigInteger.valueOf(a).multiply(BigInteger.valueOf(c));
        BigInteger ad = BigInteger.valueOf(a).multiply(BigInteger.valueOf(d));

        BigInteger result1 = ac.max(ad);

        BigInteger bc = BigInteger.valueOf(b).multiply(BigInteger.valueOf(c));
        BigInteger bd = BigInteger.valueOf(b).multiply(BigInteger.valueOf(d));

        BigInteger result2 = bc.max(bd);

        System.out.println(result1.max(result2));

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

        BigInteger ac = BigInteger.valueOf(a).multiply(BigInteger.valueOf(c));
        BigInteger ad = BigInteger.valueOf(a).multiply(BigInteger.valueOf(d));

        BigInteger result1 = ac.max(ad);

        BigInteger bc = BigInteger.valueOf(b).multiply(BigInteger.valueOf(c));
        BigInteger bd = BigInteger.valueOf(b).multiply(BigInteger.valueOf(d));

        BigInteger result2 = bc.max(bd);

        System.out.println(result1.max(result2));

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

        BigInteger ac = BigInteger.valueOf(a).multiply(BigInteger.valueOf(c));
        BigInteger ad = BigInteger.valueOf(a).multiply(BigInteger.valueOf(d));

        BigInteger result1 = ac.max(ad);

        BigInteger bc = BigInteger.valueOf(b).multiply(BigInteger.valueOf(c));
        BigInteger bd = BigInteger.valueOf(b).multiply(BigInteger.valueOf(d));

        BigInteger result2 = bc.max(bd);

        System.out.println(result1.max(result2));

    }
} 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.nextLong();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long d = sc.nextLong();

        BigInteger ac = BigInteger.valueOf(a).multiply(BigInteger.valueOf(c));
        BigInteger ad = BigInteger.valueOf(a).multiply(BigInteger.valueOf(d));

        BigInteger result1 = ac.max(ad);

        BigInteger bc = BigInteger.valueOf(b).multiply(BigInteger.valueOf(c));
        BigInteger bd = BigInteger.valueOf(b).multiply(BigInteger.valueOf(d));

        BigInteger result2 = bc.max(bd);

        System.out.println(result1.max(result2));

    }
}