

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main {
    public static void main(String[] args)throws IOException {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st;
        StringBuilder print=new StringBuilder();
        st=new StringTokenizer(br.readLine());
        int a=Integer.parseInt(st.nextToken());
        int b=Integer.parseInt(st.nextToken());
        int c=Integer.parseInt(st.nextToken());
        int d=Integer.parseInt(st.nextToken());
        int maxxneg=a;
        int maxxpos=b;
        int maxypos=d;
        int maxyneg=c;
        long ans=Long.MIN_VALUE;
        if(maxxpos>0&&maxypos>0){
            ans=Math.max(ans,1l*maxxpos*maxypos);
        }
        if(maxxneg<0&&maxyneg<0){
            ans=Math.max(ans,1l*maxxneg*maxyneg);
        }
        ans=Math.max(ans,1l*a*d);
        ans=Math.max(ans,1l*b*c);
        System.out.println(ans);
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.StringTokenizer; StringTokenizer java.util public class Main {
    public static void main(String[] args)throws IOException {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st;
        StringBuilder print=new StringBuilder();
        st=new StringTokenizer(br.readLine());
        int a=Integer.parseInt(st.nextToken());
        int b=Integer.parseInt(st.nextToken());
        int c=Integer.parseInt(st.nextToken());
        int d=Integer.parseInt(st.nextToken());
        int maxxneg=a;
        int maxxpos=b;
        int maxypos=d;
        int maxyneg=c;
        long ans=Long.MIN_VALUE;
        if(maxxpos>0&&maxypos>0){
            ans=Math.max(ans,1l*maxxpos*maxypos);
        }
        if(maxxneg<0&&maxyneg<0){
            ans=Math.max(ans,1l*maxxneg*maxyneg);
        }
        ans=Math.max(ans,1l*a*d);
        ans=Math.max(ans,1l*b*c);
        System.out.println(ans);
    }
} Main public static void main(String[] args)throws IOException {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st;
        StringBuilder print=new StringBuilder();
        st=new StringTokenizer(br.readLine());
        int a=Integer.parseInt(st.nextToken());
        int b=Integer.parseInt(st.nextToken());
        int c=Integer.parseInt(st.nextToken());
        int d=Integer.parseInt(st.nextToken());
        int maxxneg=a;
        int maxxpos=b;
        int maxypos=d;
        int maxyneg=c;
        long ans=Long.MIN_VALUE;
        if(maxxpos>0&&maxypos>0){
            ans=Math.max(ans,1l*maxxpos*maxypos);
        }
        if(maxxneg<0&&maxyneg<0){
            ans=Math.max(ans,1l*maxxneg*maxyneg);
        }
        ans=Math.max(ans,1l*a*d);
        ans=Math.max(ans,1l*b*c);
        System.out.println(ans);
    } main {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st;
        StringBuilder print=new StringBuilder();
        st=new StringTokenizer(br.readLine());
        int a=Integer.parseInt(st.nextToken());
        int b=Integer.parseInt(st.nextToken());
        int c=Integer.parseInt(st.nextToken());
        int d=Integer.parseInt(st.nextToken());
        int maxxneg=a;
        int maxxpos=b;
        int maxypos=d;
        int maxyneg=c;
        long ans=Long.MIN_VALUE;
        if(maxxpos>0&&maxypos>0){
            ans=Math.max(ans,1l*maxxpos*maxypos);
        }
        if(maxxneg<0&&maxyneg<0){
            ans=Math.max(ans,1l*maxxneg*maxyneg);
        }
        ans=Math.max(ans,1l*a*d);
        ans=Math.max(ans,1l*b*c);
        System.out.println(ans);
    } BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringTokenizer st; st StringBuilder print=new StringBuilder(); print new StringBuilder() st=new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) int a=Integer.parseInt(st.nextToken()); a Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st int b=Integer.parseInt(st.nextToken()); b Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st int c=Integer.parseInt(st.nextToken()); c Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st int d=Integer.parseInt(st.nextToken()); d Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st int maxxneg=a; maxxneg a int maxxpos=b; maxxpos b int maxypos=d; maxypos d int maxyneg=c; maxyneg c long ans=Long.MIN_VALUE; ans Long.MIN_VALUE Long Long.MIN_VALUE if(maxxpos>0&&maxypos>0){
            ans=Math.max(ans,1l*maxxpos*maxypos);
        } maxxpos>0&&maxypos>0 maxxpos>0 maxxpos 0 maxypos>0 maxypos 0 {
            ans=Math.max(ans,1l*maxxpos*maxypos);
        } ans=Math.max(ans,1l*maxxpos*maxypos) ans Math.max(ans,1l*maxxpos*maxypos) Math.max Math ans 1l*maxxpos*maxypos 1l*maxxpos*maxypos 1l maxxpos maxypos if(maxxneg<0&&maxyneg<0){
            ans=Math.max(ans,1l*maxxneg*maxyneg);
        } maxxneg<0&&maxyneg<0 maxxneg<0 maxxneg 0 maxyneg<0 maxyneg 0 {
            ans=Math.max(ans,1l*maxxneg*maxyneg);
        } ans=Math.max(ans,1l*maxxneg*maxyneg) ans Math.max(ans,1l*maxxneg*maxyneg) Math.max Math ans 1l*maxxneg*maxyneg 1l*maxxneg*maxyneg 1l maxxneg maxyneg ans=Math.max(ans,1l*a*d) ans Math.max(ans,1l*a*d) Math.max Math ans 1l*a*d 1l*a*d 1l a d ans=Math.max(ans,1l*b*c) ans Math.max(ans,1l*b*c) Math.max Math ans 1l*b*c 1l*b*c 1l b c System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
    public static void main(String[] args)throws IOException {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st;
        StringBuilder print=new StringBuilder();
        st=new StringTokenizer(br.readLine());
        int a=Integer.parseInt(st.nextToken());
        int b=Integer.parseInt(st.nextToken());
        int c=Integer.parseInt(st.nextToken());
        int d=Integer.parseInt(st.nextToken());
        int maxxneg=a;
        int maxxpos=b;
        int maxypos=d;
        int maxyneg=c;
        long ans=Long.MIN_VALUE;
        if(maxxpos>0&&maxypos>0){
            ans=Math.max(ans,1l*maxxpos*maxypos);
        }
        if(maxxneg<0&&maxyneg<0){
            ans=Math.max(ans,1l*maxxneg*maxyneg);
        }
        ans=Math.max(ans,1l*a*d);
        ans=Math.max(ans,1l*b*c);
        System.out.println(ans);
    }
} public class Main {
    public static void main(String[] args)throws IOException {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st;
        StringBuilder print=new StringBuilder();
        st=new StringTokenizer(br.readLine());
        int a=Integer.parseInt(st.nextToken());
        int b=Integer.parseInt(st.nextToken());
        int c=Integer.parseInt(st.nextToken());
        int d=Integer.parseInt(st.nextToken());
        int maxxneg=a;
        int maxxpos=b;
        int maxypos=d;
        int maxyneg=c;
        long ans=Long.MIN_VALUE;
        if(maxxpos>0&&maxypos>0){
            ans=Math.max(ans,1l*maxxpos*maxypos);
        }
        if(maxxneg<0&&maxyneg<0){
            ans=Math.max(ans,1l*maxxneg*maxyneg);
        }
        ans=Math.max(ans,1l*a*d);
        ans=Math.max(ans,1l*b*c);
        System.out.println(ans);
    }
} Main


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main {
    public static void main(String[] args)throws IOException {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st;
        StringBuilder print=new StringBuilder();
        st=new StringTokenizer(br.readLine());
        int a=Integer.parseInt(st.nextToken());
        int b=Integer.parseInt(st.nextToken());
        int c=Integer.parseInt(st.nextToken());
        int d=Integer.parseInt(st.nextToken());
        int maxxneg=a;
        int maxxpos=b;
        int maxypos=d;
        int maxyneg=c;
        long ans=Long.MIN_VALUE;
        if(maxxpos>0&&maxypos>0){
            ans=Math.max(ans,1l*maxxpos*maxypos);
        }
        if(maxxneg<0&&maxyneg<0){
            ans=Math.max(ans,1l*maxxneg*maxyneg);
        }
        ans=Math.max(ans,1l*a*d);
        ans=Math.max(ans,1l*b*c);
        System.out.println(ans);
    }
}
