import java.util.Scanner;
class Main{
public static void main(String[]args){
Scanner input=new Scanner(System.in);
  long a=input.nextInt();
  long b=input.nextInt();
  long c=input.nextInt();
  long d=input.nextInt();
  long max=a*c>b*d?a*c:b*d;
  max=max>a*d?max:a*d;
  max=max>b*c?max:b*c;
    System.out.println(max);
}
} import java.util.Scanner; Scanner java.util class Main{
public static void main(String[]args){
Scanner input=new Scanner(System.in);
  long a=input.nextInt();
  long b=input.nextInt();
  long c=input.nextInt();
  long d=input.nextInt();
  long max=a*c>b*d?a*c:b*d;
  max=max>a*d?max:a*d;
  max=max>b*c?max:b*c;
    System.out.println(max);
}
} Main public static void main(String[]args){
Scanner input=new Scanner(System.in);
  long a=input.nextInt();
  long b=input.nextInt();
  long c=input.nextInt();
  long d=input.nextInt();
  long max=a*c>b*d?a*c:b*d;
  max=max>a*d?max:a*d;
  max=max>b*c?max:b*c;
    System.out.println(max);
} main {
Scanner input=new Scanner(System.in);
  long a=input.nextInt();
  long b=input.nextInt();
  long c=input.nextInt();
  long d=input.nextInt();
  long max=a*c>b*d?a*c:b*d;
  max=max>a*d?max:a*d;
  max=max>b*c?max:b*c;
    System.out.println(max);
} Scanner input=new Scanner(System.in); input new Scanner(System.in) long a=input.nextInt(); a input.nextInt() input.nextInt input long b=input.nextInt(); b input.nextInt() input.nextInt input long c=input.nextInt(); c input.nextInt() input.nextInt input long d=input.nextInt(); d input.nextInt() input.nextInt input long max=a*c>b*d?a*c:b*d; max a*c>b*d?a*c:b*d a*c>b*d a*c a c b*d b d a*c a c b*d b d max=max>a*d?max:a*d max max>a*d?max:a*d max>a*d max a*d a d max a*d a d max=max>b*c?max:b*c max max>b*c?max:b*c max>b*c max b*c b c max b*c b c System.out.println(max) System.out.println System.out System System.out max String[]args args
import java.util.Scanner;
class Main{
public static void main(String[]args){
Scanner input=new Scanner(System.in);
  long a=input.nextInt();
  long b=input.nextInt();
  long c=input.nextInt();
  long d=input.nextInt();
  long max=a*c>b*d?a*c:b*d;
  max=max>a*d?max:a*d;
  max=max>b*c?max:b*c;
    System.out.println(max);
}
}