import java.io.BufferedReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Main {
    
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        StringTokenizer st = new StringTokenizer(br.readLine());

        long a = Long.parseLong(st.nextToken());
        long b = Long.parseLong(st.nextToken());
        long c = Long.parseLong(st.nextToken());
        long d = Long.parseLong(st.nextToken());
        
        long ans1 = a * c;
        long ans2 = a * d;
        long ans3 = b * c;
        long ans4 = b * d;

        long[] ans_array = {ans1, ans2, ans3, ans4};

        Arrays.sort(ans_array);

        pw.println(ans_array[3]);
        br.close();
        pw.close();
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.PrintWriter; PrintWriter java.io import java.util.Arrays; Arrays java.util import java.util.StringTokenizer; StringTokenizer java.util public class Main {
    
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        StringTokenizer st = new StringTokenizer(br.readLine());

        long a = Long.parseLong(st.nextToken());
        long b = Long.parseLong(st.nextToken());
        long c = Long.parseLong(st.nextToken());
        long d = Long.parseLong(st.nextToken());
        
        long ans1 = a * c;
        long ans2 = a * d;
        long ans3 = b * c;
        long ans4 = b * d;

        long[] ans_array = {ans1, ans2, ans3, ans4};

        Arrays.sort(ans_array);

        pw.println(ans_array[3]);
        br.close();
        pw.close();
    }
} Main public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        StringTokenizer st = new StringTokenizer(br.readLine());

        long a = Long.parseLong(st.nextToken());
        long b = Long.parseLong(st.nextToken());
        long c = Long.parseLong(st.nextToken());
        long d = Long.parseLong(st.nextToken());
        
        long ans1 = a * c;
        long ans2 = a * d;
        long ans3 = b * c;
        long ans4 = b * d;

        long[] ans_array = {ans1, ans2, ans3, ans4};

        Arrays.sort(ans_array);

        pw.println(ans_array[3]);
        br.close();
        pw.close();
    } main {
        BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        StringTokenizer st = new StringTokenizer(br.readLine());

        long a = Long.parseLong(st.nextToken());
        long b = Long.parseLong(st.nextToken());
        long c = Long.parseLong(st.nextToken());
        long d = Long.parseLong(st.nextToken());
        
        long ans1 = a * c;
        long ans2 = a * d;
        long ans3 = b * c;
        long ans4 = b * d;

        long[] ans_array = {ans1, ans2, ans3, ans4};

        Arrays.sort(ans_array);

        pw.println(ans_array[3]);
        br.close();
        pw.close();
    } BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in)); br new BufferedReader(new java.io.InputStreamReader(System.in)) PrintWriter pw = new PrintWriter(System.out); pw new PrintWriter(System.out) StringTokenizer st = new StringTokenizer(br.readLine()); st new StringTokenizer(br.readLine()) long a = Long.parseLong(st.nextToken()); a Long.parseLong(st.nextToken()) Long.parseLong Long st.nextToken() st.nextToken st long b = Long.parseLong(st.nextToken()); b Long.parseLong(st.nextToken()) Long.parseLong Long st.nextToken() st.nextToken st long c = Long.parseLong(st.nextToken()); c Long.parseLong(st.nextToken()) Long.parseLong Long st.nextToken() st.nextToken st long d = Long.parseLong(st.nextToken()); d Long.parseLong(st.nextToken()) Long.parseLong Long st.nextToken() st.nextToken st long ans1 = a * c; ans1 a * c a c long ans2 = a * d; ans2 a * d a d long ans3 = b * c; ans3 b * c b c long ans4 = b * d; ans4 b * d b d long[] ans_array = {ans1, ans2, ans3, ans4}; ans_array {ans1, ans2, ans3, ans4} ans1 ans2 ans3 ans4 Arrays.sort(ans_array) Arrays.sort Arrays ans_array pw.println(ans_array[3]) pw.println pw ans_array[3] ans_array 3 br.close() br.close br pw.close() pw.close pw String[] args args public class Main {
    
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        StringTokenizer st = new StringTokenizer(br.readLine());

        long a = Long.parseLong(st.nextToken());
        long b = Long.parseLong(st.nextToken());
        long c = Long.parseLong(st.nextToken());
        long d = Long.parseLong(st.nextToken());
        
        long ans1 = a * c;
        long ans2 = a * d;
        long ans3 = b * c;
        long ans4 = b * d;

        long[] ans_array = {ans1, ans2, ans3, ans4};

        Arrays.sort(ans_array);

        pw.println(ans_array[3]);
        br.close();
        pw.close();
    }
} public class Main {
    
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        StringTokenizer st = new StringTokenizer(br.readLine());

        long a = Long.parseLong(st.nextToken());
        long b = Long.parseLong(st.nextToken());
        long c = Long.parseLong(st.nextToken());
        long d = Long.parseLong(st.nextToken());
        
        long ans1 = a * c;
        long ans2 = a * d;
        long ans3 = b * c;
        long ans4 = b * d;

        long[] ans_array = {ans1, ans2, ans3, ans4};

        Arrays.sort(ans_array);

        pw.println(ans_array[3]);
        br.close();
        pw.close();
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Main {
    
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        StringTokenizer st = new StringTokenizer(br.readLine());

        long a = Long.parseLong(st.nextToken());
        long b = Long.parseLong(st.nextToken());
        long c = Long.parseLong(st.nextToken());
        long d = Long.parseLong(st.nextToken());
        
        long ans1 = a * c;
        long ans2 = a * d;
        long ans3 = b * c;
        long ans4 = b * d;

        long[] ans_array = {ans1, ans2, ans3, ans4};

        Arrays.sort(ans_array);

        pw.println(ans_array[3]);
        br.close();
        pw.close();
    }
}