import java.util.*;
import java.io.*;
import java.math.BigInteger;
 
public class Main {
	public static long mod = 1000000007;
	
	public static void main(String[] args) {
	Scanner s = new Scanner(System.in);
	long a = s.nextLong();
	long b = s.nextLong();
	long c = s.nextLong();
	long d = s.nextLong();
	
	long max = Long.MIN_VALUE;
	max = Math.max(max, a*c);
	max = Math.max(max, a*d);
	max = Math.max(max, b*c);
	max = Math.max(max, b*d);

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

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

	System.out.println(max);
    
  } main {
	Scanner s = new Scanner(System.in);
	long a = s.nextLong();
	long b = s.nextLong();
	long c = s.nextLong();
	long d = s.nextLong();
	
	long max = Long.MIN_VALUE;
	max = Math.max(max, a*c);
	max = Math.max(max, a*d);
	max = Math.max(max, b*c);
	max = Math.max(max, b*d);

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

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

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

	System.out.println(max);
    
  }
}