

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

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        String[] s=br.readLine().split(" ");
        long a=Long.parseLong(s[0].trim());
        long b=Long.parseLong(s[1].trim());
        long c=Long.parseLong(s[2].trim());
        long d=Long.parseLong(s[3].trim());
        long res=Math.max(Math.max(a*c,a*d),Math.max(b*c,b*d));
        System.out.println(res);


    }



} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        String[] s=br.readLine().split(" ");
        long a=Long.parseLong(s[0].trim());
        long b=Long.parseLong(s[1].trim());
        long c=Long.parseLong(s[2].trim());
        long d=Long.parseLong(s[3].trim());
        long res=Math.max(Math.max(a*c,a*d),Math.max(b*c,b*d));
        System.out.println(res);


    }



} Main public static void main(String[] args) throws IOException {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        String[] s=br.readLine().split(" ");
        long a=Long.parseLong(s[0].trim());
        long b=Long.parseLong(s[1].trim());
        long c=Long.parseLong(s[2].trim());
        long d=Long.parseLong(s[3].trim());
        long res=Math.max(Math.max(a*c,a*d),Math.max(b*c,b*d));
        System.out.println(res);


    } main {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        String[] s=br.readLine().split(" ");
        long a=Long.parseLong(s[0].trim());
        long b=Long.parseLong(s[1].trim());
        long c=Long.parseLong(s[2].trim());
        long d=Long.parseLong(s[3].trim());
        long res=Math.max(Math.max(a*c,a*d),Math.max(b*c,b*d));
        System.out.println(res);


    } BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String[] s=br.readLine().split(" "); s br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " long a=Long.parseLong(s[0].trim()); a Long.parseLong(s[0].trim()) Long.parseLong Long s[0].trim() s[0].trim s[0] s 0 long b=Long.parseLong(s[1].trim()); b Long.parseLong(s[1].trim()) Long.parseLong Long s[1].trim() s[1].trim s[1] s 1 long c=Long.parseLong(s[2].trim()); c Long.parseLong(s[2].trim()) Long.parseLong Long s[2].trim() s[2].trim s[2] s 2 long d=Long.parseLong(s[3].trim()); d Long.parseLong(s[3].trim()) Long.parseLong Long s[3].trim() s[3].trim s[3] s 3 long res=Math.max(Math.max(a*c,a*d),Math.max(b*c,b*d)); res Math.max(Math.max(a*c,a*d),Math.max(b*c,b*d)) Math.max Math Math.max(a*c,a*d) Math.max Math a*c a c a*d a d Math.max(b*c,b*d) Math.max Math b*c b c b*d b d System.out.println(res) System.out.println System.out System System.out res String[] args args public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        String[] s=br.readLine().split(" ");
        long a=Long.parseLong(s[0].trim());
        long b=Long.parseLong(s[1].trim());
        long c=Long.parseLong(s[2].trim());
        long d=Long.parseLong(s[3].trim());
        long res=Math.max(Math.max(a*c,a*d),Math.max(b*c,b*d));
        System.out.println(res);


    }



} public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        String[] s=br.readLine().split(" ");
        long a=Long.parseLong(s[0].trim());
        long b=Long.parseLong(s[1].trim());
        long c=Long.parseLong(s[2].trim());
        long d=Long.parseLong(s[3].trim());
        long res=Math.max(Math.max(a*c,a*d),Math.max(b*c,b*d));
        System.out.println(res);


    }



} Main


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

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        String[] s=br.readLine().split(" ");
        long a=Long.parseLong(s[0].trim());
        long b=Long.parseLong(s[1].trim());
        long c=Long.parseLong(s[2].trim());
        long d=Long.parseLong(s[3].trim());
        long res=Math.max(Math.max(a*c,a*d),Math.max(b*c,b*d));
        System.out.println(res);


    }



}
