import java.util.Scanner;

public class Main {
    public static void main(final String[] args) {
    	Scanner s = new Scanner(System.in);
    	long a = s.nextLong(), b = s.nextLong(), c = s.nextLong(), d = s.nextLong();
    	long r = b * d;
    	r = Math.max(r, a * c);
    	r = Math.max(r, a * d);
    	r = Math.max(r, b * c);
    	System.out.println(r);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(final String[] args) {
    	Scanner s = new Scanner(System.in);
    	long a = s.nextLong(), b = s.nextLong(), c = s.nextLong(), d = s.nextLong();
    	long r = b * d;
    	r = Math.max(r, a * c);
    	r = Math.max(r, a * d);
    	r = Math.max(r, b * c);
    	System.out.println(r);
    }
} Main public static void main(final String[] args) {
    	Scanner s = new Scanner(System.in);
    	long a = s.nextLong(), b = s.nextLong(), c = s.nextLong(), d = s.nextLong();
    	long r = b * d;
    	r = Math.max(r, a * c);
    	r = Math.max(r, a * d);
    	r = Math.max(r, b * c);
    	System.out.println(r);
    } main {
    	Scanner s = new Scanner(System.in);
    	long a = s.nextLong(), b = s.nextLong(), c = s.nextLong(), d = s.nextLong();
    	long r = b * d;
    	r = Math.max(r, a * c);
    	r = Math.max(r, a * d);
    	r = Math.max(r, b * c);
    	System.out.println(r);
    } Scanner s = new Scanner(System.in); s new Scanner(System.in) long a = s.nextLong() a s.nextLong() s.nextLong s b = s.nextLong() b s.nextLong() s.nextLong s c = s.nextLong() c s.nextLong() s.nextLong s d = s.nextLong(); d s.nextLong() s.nextLong s long r = b * d; r b * d b d r = Math.max(r, a * c) r Math.max(r, a * c) Math.max Math r a * c a c r = Math.max(r, a * d) r Math.max(r, a * d) Math.max Math r a * d a d r = Math.max(r, b * c) r Math.max(r, b * c) Math.max Math r b * c b c System.out.println(r) System.out.println System.out System System.out r final String[] args args public class Main {
    public static void main(final String[] args) {
    	Scanner s = new Scanner(System.in);
    	long a = s.nextLong(), b = s.nextLong(), c = s.nextLong(), d = s.nextLong();
    	long r = b * d;
    	r = Math.max(r, a * c);
    	r = Math.max(r, a * d);
    	r = Math.max(r, b * c);
    	System.out.println(r);
    }
} public class Main {
    public static void main(final String[] args) {
    	Scanner s = new Scanner(System.in);
    	long a = s.nextLong(), b = s.nextLong(), c = s.nextLong(), d = s.nextLong();
    	long r = b * d;
    	r = Math.max(r, a * c);
    	r = Math.max(r, a * d);
    	r = Math.max(r, b * c);
    	System.out.println(r);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(final String[] args) {
    	Scanner s = new Scanner(System.in);
    	long a = s.nextLong(), b = s.nextLong(), c = s.nextLong(), d = s.nextLong();
    	long r = b * d;
    	r = Math.max(r, a * c);
    	r = Math.max(r, a * d);
    	r = Math.max(r, b * c);
    	System.out.println(r);
    }
}
