import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws NumberFormatException, IOException {
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	String input[] = br.readLine().split(" ");
	long a = Long.parseLong(input[0]);
	long b = Long.parseLong(input[1]);
	long c = Long.parseLong(input[2]);
	long d = Long.parseLong(input[3]);

	System.out.println(Math.max(Math.max(a * c, a * d), Math.max(b * c, b * d)));
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
    public static void main(String[] args) throws NumberFormatException, IOException {
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	String input[] = br.readLine().split(" ");
	long a = Long.parseLong(input[0]);
	long b = Long.parseLong(input[1]);
	long c = Long.parseLong(input[2]);
	long d = Long.parseLong(input[3]);

	System.out.println(Math.max(Math.max(a * c, a * d), Math.max(b * c, b * d)));
    }
} Main public static void main(String[] args) throws NumberFormatException, IOException {
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	String input[] = br.readLine().split(" ");
	long a = Long.parseLong(input[0]);
	long b = Long.parseLong(input[1]);
	long c = Long.parseLong(input[2]);
	long d = Long.parseLong(input[3]);

	System.out.println(Math.max(Math.max(a * c, a * d), Math.max(b * c, b * d)));
    } main {
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	String input[] = br.readLine().split(" ");
	long a = Long.parseLong(input[0]);
	long b = Long.parseLong(input[1]);
	long c = Long.parseLong(input[2]);
	long d = Long.parseLong(input[3]);

	System.out.println(Math.max(Math.max(a * c, a * d), Math.max(b * c, b * d)));
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String input[] = br.readLine().split(" "); input br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " long a = Long.parseLong(input[0]); a Long.parseLong(input[0]) Long.parseLong Long input[0] input 0 long b = Long.parseLong(input[1]); b Long.parseLong(input[1]) Long.parseLong Long input[1] input 1 long c = Long.parseLong(input[2]); c Long.parseLong(input[2]) Long.parseLong Long input[2] input 2 long d = Long.parseLong(input[3]); d Long.parseLong(input[3]) Long.parseLong Long input[3] input 3 System.out.println(Math.max(Math.max(a * c, a * d), Math.max(b * c, b * d))) System.out.println System.out System System.out Math.max(Math.max(a * c, a * d), Math.max(b * c, b * d)) Math.max Math Math.max(a * c, a * d) Math.max Math a * c a c a * d a d Math.max(b * c, b * d) Math.max Math b * c b c b * d b d String[] args args public class Main {
    public static void main(String[] args) throws NumberFormatException, IOException {
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	String input[] = br.readLine().split(" ");
	long a = Long.parseLong(input[0]);
	long b = Long.parseLong(input[1]);
	long c = Long.parseLong(input[2]);
	long d = Long.parseLong(input[3]);

	System.out.println(Math.max(Math.max(a * c, a * d), Math.max(b * c, b * d)));
    }
} public class Main {
    public static void main(String[] args) throws NumberFormatException, IOException {
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	String input[] = br.readLine().split(" ");
	long a = Long.parseLong(input[0]);
	long b = Long.parseLong(input[1]);
	long c = Long.parseLong(input[2]);
	long d = Long.parseLong(input[3]);

	System.out.println(Math.max(Math.max(a * c, a * d), Math.max(b * c, b * d)));
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws NumberFormatException, IOException {
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	String input[] = br.readLine().split(" ");
	long a = Long.parseLong(input[0]);
	long b = Long.parseLong(input[1]);
	long c = Long.parseLong(input[2]);
	long d = Long.parseLong(input[3]);

	System.out.println(Math.max(Math.max(a * c, a * d), Math.max(b * c, b * d)));
    }
}