import java.util.*;
import java.io.*;
 
public class Main{
  Scanner sc = new Scanner(System.in);	
 
  public void run(){
    long a = sc.nextLong();
    long b = sc.nextLong();
    long c = sc.nextLong();
    long d = sc.nextLong();
    
    long 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 static void main(String[] args){
    Main m = new Main();
    m.run();
  }
} import java.util.*; util.* java import java.io.*; io.* java public class Main{
  Scanner sc = new Scanner(System.in);	
 
  public void run(){
    long a = sc.nextLong();
    long b = sc.nextLong();
    long c = sc.nextLong();
    long d = sc.nextLong();
    
    long 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 static void main(String[] args){
    Main m = new Main();
    m.run();
  }
} Main Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public void run(){
    long a = sc.nextLong();
    long b = sc.nextLong();
    long c = sc.nextLong();
    long d = sc.nextLong();
    
    long 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);
  } run {
    long a = sc.nextLong();
    long b = sc.nextLong();
    long c = sc.nextLong();
    long d = sc.nextLong();
    
    long 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);
  } 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 long max = a*c; 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 public static void main(String[] args){
    Main m = new Main();
    m.run();
  } main {
    Main m = new Main();
    m.run();
  } Main m = new Main(); m new Main() m.run() m.run m String[] args args public class Main{
  Scanner sc = new Scanner(System.in);	
 
  public void run(){
    long a = sc.nextLong();
    long b = sc.nextLong();
    long c = sc.nextLong();
    long d = sc.nextLong();
    
    long 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 static void main(String[] args){
    Main m = new Main();
    m.run();
  }
} public class Main{
  Scanner sc = new Scanner(System.in);	
 
  public void run(){
    long a = sc.nextLong();
    long b = sc.nextLong();
    long c = sc.nextLong();
    long d = sc.nextLong();
    
    long 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 static void main(String[] args){
    Main m = new Main();
    m.run();
  }
} Main
import java.util.*;
import java.io.*;
 
public class Main{
  Scanner sc = new Scanner(System.in);	
 
  public void run(){
    long a = sc.nextLong();
    long b = sc.nextLong();
    long c = sc.nextLong();
    long d = sc.nextLong();
    
    long 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 static void main(String[] args){
    Main m = new Main();
    m.run();
  }
}