// #pragma GCC optimize("Ofast")
// #pragma GCC optimize ("unroll-loops")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
using namespace std;
 
using ull = unsigned long long int;
using ll = long long int;
using du = double;
using ld = long du;
using vi = vector<int>;
using vll = vector<ll>;
using vld = vector<ld>;
using vdu = vector<du>;
using vs = vector<string>;
using vc = vector<char>;
using si = set<int>;
using sll = set<ll>;
using sdu = set<du>;
using sld = set<ld>;
using pii = pair<int, int>;
using pll = pair<ll,ll>;
using pdu = pair<du,du>;
using pld = pair<ld,ld>;
using pis = pair<int,string>;
 
#define FASTIO ios_base::sync_with_stdio(false); cin.tie(nullptr)
#define sp(x) setprecision(x)<<fixed
#define loop(i,n) for(int i=0;i<n;i++)
#define ff first
#define ss second
#define pi acos(-1)
#define meme(a,x) memset(a,x,sizeof(a))
#define all(a) a.begin(),a.end()
//debugger
 
#ifdef KAIZER
#include "debug.h"
#else
#define debug(x...)
#endif
//debugger
 
//functions
bool check_pow(ll a)
{
    if((a&(a-1))==0) return true;
    else return false;
}
ld my_pow(ld a,int b)
{
    ld ans=1;
    for(int i=0;i<b;i++) ans*=a;
    return ans;
}
ll digits(ll a)
{
    string line=to_string(a);
    return line.size();
}
bool prime_check(ll a)
{
    bool flag=true;
    for(ll i=2;i<=sqrt(a);i++)
    {
        if(a%i==0) {flag=false; break;}
    }
    return flag;
}
bool comp(const pair<int,int> &a , const pair<int,int> &b)
{
    if(a.ff!=b.ff) return a.ff>b.ff;
    else return a.ss<b.ss;
}
bool comp2(const ll &a, const ll &b)
{
     return a>b;
}
 
//functions
struct segtree
{
    ll size;
    vector<pair<int,int>> el;
    void mek(int n)
    {
        if(!check_pow(n)) 
        {
            int p =(log10(n)/log10(2))+1;
            n=1<<p;
        }
        size=n;
        el.assign((2*size),{INT_MAX,1});
        debug(el);
    }
    void in(int a, int b)
    {
        a+=size;
        el[a]={b,1};
        while(a!=1)
        {
            a/=2;
            el[a]=min(el[a*2],el[a*2+1]);
            if(el[a*2].ff==el[a*2+1].ff) el[a].ss=el[a*2].ss+el[a*2+1].ss;
        }
        //debug(el);
    }
    pair<int,int> choto(int a,int b)
    {
        pair<int,int> ans={INT_MAX,0};
        a+=size;
        b+=size;
        while(a<=b)
        {
            debug(a,b,ans);
            if(a%2)
            {
                //debug(el[a],ans);
                if(el[a].ff==ans.ff) ans.ss+=el[a].ss;
                else if(el[a].ff<ans.ff) 
                {
                    ans.ff=el[a].ff;
                    ans.ss=el[a].ss;
                }
                //debug(el[a],ans);
                a++;
            }
            if(b%2==0)
            {
                //debug(el[b],ans);
                if(el[b].ff==ans.ff) ans.ss+=el[b].ss;
                else if(el[b].ff<ans.ff) 
                {
                    ans.ff=el[b].ff;
                    ans.ss=el[b].ss;
                }
                //debug(el[b],ans);
                b--;
            }
            a/=2;
            b/=2;
        }
        return ans;
    }
};

int main() {
    //freopen("in","r",stdin);
    //freopen("out","w",stdout);
    FASTIO;
    ll a,b,c,d; 
    cin>>a>>b>>c>>d;
    ll ans=max((b*c),(b*d));
    ans=max((a*c),ans);
    ans=max((a*d),ans);
    cout<<ans<<endl;
}

Measured memory_bytes: 3692