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

public class Main {

	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		StringTokenizer st = new StringTokenizer(br.readLine(), " ");
		
		long a = Long.parseLong(st.nextToken());
		long b = Long.parseLong(st.nextToken());
		long c = Long.parseLong(st.nextToken());
		long d = Long.parseLong(st.nextToken());

		long ans = Math.max(a * c, a * d);
		ans = Math.max( ans, Math.max(b*c, b * d));
		
		System.out.println(ans);
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.StringTokenizer; StringTokenizer java.util public class Main {

	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		StringTokenizer st = new StringTokenizer(br.readLine(), " ");
		
		long a = Long.parseLong(st.nextToken());
		long b = Long.parseLong(st.nextToken());
		long c = Long.parseLong(st.nextToken());
		long d = Long.parseLong(st.nextToken());

		long ans = Math.max(a * c, a * d);
		ans = Math.max( ans, Math.max(b*c, b * d));
		
		System.out.println(ans);
	}
} Main public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		StringTokenizer st = new StringTokenizer(br.readLine(), " ");
		
		long a = Long.parseLong(st.nextToken());
		long b = Long.parseLong(st.nextToken());
		long c = Long.parseLong(st.nextToken());
		long d = Long.parseLong(st.nextToken());

		long ans = Math.max(a * c, a * d);
		ans = Math.max( ans, Math.max(b*c, b * d));
		
		System.out.println(ans);
	} main {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		StringTokenizer st = new StringTokenizer(br.readLine(), " ");
		
		long a = Long.parseLong(st.nextToken());
		long b = Long.parseLong(st.nextToken());
		long c = Long.parseLong(st.nextToken());
		long d = Long.parseLong(st.nextToken());

		long ans = Math.max(a * c, a * d);
		ans = Math.max( ans, Math.max(b*c, b * d));
		
		System.out.println(ans);
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringTokenizer st = new StringTokenizer(br.readLine(), " "); st new StringTokenizer(br.readLine(), " ") long a = Long.parseLong(st.nextToken()); a Long.parseLong(st.nextToken()) Long.parseLong Long st.nextToken() st.nextToken st long b = Long.parseLong(st.nextToken()); b Long.parseLong(st.nextToken()) Long.parseLong Long st.nextToken() st.nextToken st long c = Long.parseLong(st.nextToken()); c Long.parseLong(st.nextToken()) Long.parseLong Long st.nextToken() st.nextToken st long d = Long.parseLong(st.nextToken()); d Long.parseLong(st.nextToken()) Long.parseLong Long st.nextToken() st.nextToken st long ans = Math.max(a * c, a * d); ans Math.max(a * c, a * d) Math.max Math a * c a c a * d a d ans = Math.max( ans, Math.max(b*c, b * d)) ans Math.max( ans, Math.max(b*c, b * d)) Math.max Math ans Math.max(b*c, b * d) Math.max Math b*c b c b * d b d System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		StringTokenizer st = new StringTokenizer(br.readLine(), " ");
		
		long a = Long.parseLong(st.nextToken());
		long b = Long.parseLong(st.nextToken());
		long c = Long.parseLong(st.nextToken());
		long d = Long.parseLong(st.nextToken());

		long ans = Math.max(a * c, a * d);
		ans = Math.max( ans, Math.max(b*c, b * d));
		
		System.out.println(ans);
	}
} public class Main {

	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		StringTokenizer st = new StringTokenizer(br.readLine(), " ");
		
		long a = Long.parseLong(st.nextToken());
		long b = Long.parseLong(st.nextToken());
		long c = Long.parseLong(st.nextToken());
		long d = Long.parseLong(st.nextToken());

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

public class Main {

	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		StringTokenizer st = new StringTokenizer(br.readLine(), " ");
		
		long a = Long.parseLong(st.nextToken());
		long b = Long.parseLong(st.nextToken());
		long c = Long.parseLong(st.nextToken());
		long d = Long.parseLong(st.nextToken());

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