import java.io.*;
import java.util.*;

class Main
{
    public static void main(String args[])throws Exception
    {
        BufferedReader bu=new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb=new StringBuilder();
        String s[]=bu.readLine().split(" ");
        int a[]=new int[4],i; long max=Long.MIN_VALUE;
        for(i=0;i<4;i++)
        a[i]=Integer.parseInt(s[i]);
        for(i=0;i<2;i++)
        for(int j=2;j<4;j++)
        {
            long cur=1l*a[i]*a[j];
            max=Math.max(max,cur);
        }
        System.out.print(max);
    }
} import java.io.*; io.* java import java.util.*; util.* java class Main
{
    public static void main(String args[])throws Exception
    {
        BufferedReader bu=new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb=new StringBuilder();
        String s[]=bu.readLine().split(" ");
        int a[]=new int[4],i; long max=Long.MIN_VALUE;
        for(i=0;i<4;i++)
        a[i]=Integer.parseInt(s[i]);
        for(i=0;i<2;i++)
        for(int j=2;j<4;j++)
        {
            long cur=1l*a[i]*a[j];
            max=Math.max(max,cur);
        }
        System.out.print(max);
    }
} Main public static void main(String args[])throws Exception
    {
        BufferedReader bu=new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb=new StringBuilder();
        String s[]=bu.readLine().split(" ");
        int a[]=new int[4],i; long max=Long.MIN_VALUE;
        for(i=0;i<4;i++)
        a[i]=Integer.parseInt(s[i]);
        for(i=0;i<2;i++)
        for(int j=2;j<4;j++)
        {
            long cur=1l*a[i]*a[j];
            max=Math.max(max,cur);
        }
        System.out.print(max);
    } main {
        BufferedReader bu=new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb=new StringBuilder();
        String s[]=bu.readLine().split(" ");
        int a[]=new int[4],i; long max=Long.MIN_VALUE;
        for(i=0;i<4;i++)
        a[i]=Integer.parseInt(s[i]);
        for(i=0;i<2;i++)
        for(int j=2;j<4;j++)
        {
            long cur=1l*a[i]*a[j];
            max=Math.max(max,cur);
        }
        System.out.print(max);
    } BufferedReader bu=new BufferedReader(new InputStreamReader(System.in)); bu new BufferedReader(new InputStreamReader(System.in)) StringBuilder sb=new StringBuilder(); sb new StringBuilder() String s[]=bu.readLine().split(" "); s bu.readLine().split(" ") bu.readLine().split bu.readLine() bu.readLine bu " " int a[]=new int[4] a new int[4] 4 i; i long max=Long.MIN_VALUE; max Long.MIN_VALUE Long Long.MIN_VALUE for(i=0;i<4;i++)
        a[i]=Integer.parseInt(s[i]); i=0; i=0 i 0 i<4 i 4 i++ i++ i a[i]=Integer.parseInt(s[i]); a[i]=Integer.parseInt(s[i]) a[i] a i Integer.parseInt(s[i]) Integer.parseInt Integer s[i] s i for(i=0;i<2;i++)
        for(int j=2;j<4;j++)
        {
            long cur=1l*a[i]*a[j];
            max=Math.max(max,cur);
        } i=0; i=0 i 0 i<2 i 2 i++ i++ i for(int j=2;j<4;j++)
        {
            long cur=1l*a[i]*a[j];
            max=Math.max(max,cur);
        } for(int j=2;j<4;j++)
        {
            long cur=1l*a[i]*a[j];
            max=Math.max(max,cur);
        } int j=2; int j=2; j 2 j<4 j 4 j++ j++ j {
            long cur=1l*a[i]*a[j];
            max=Math.max(max,cur);
        } {
            long cur=1l*a[i]*a[j];
            max=Math.max(max,cur);
        } long cur=1l*a[i]*a[j]; cur 1l*a[i]*a[j] 1l*a[i]*a[j] 1l a[i] a i a[j] a j max=Math.max(max,cur) max Math.max(max,cur) Math.max Math max cur System.out.print(max) System.out.print System.out System System.out max String args[] args
import java.io.*;
import java.util.*;

class Main
{
    public static void main(String args[])throws Exception
    {
        BufferedReader bu=new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb=new StringBuilder();
        String s[]=bu.readLine().split(" ");
        int a[]=new int[4],i; long max=Long.MIN_VALUE;
        for(i=0;i<4;i++)
        a[i]=Integer.parseInt(s[i]);
        for(i=0;i<2;i++)
        for(int j=2;j<4;j++)
        {
            long cur=1l*a[i]*a[j];
            max=Math.max(max,cur);
        }
        System.out.print(max);
    }
}
