import java.util.Scanner;

public class Main {
    void run(String[] args){
        Scanner scan=new Scanner(System.in);
        long a=scan.nextLong();
        long b=scan.nextLong();
        long c=scan.nextLong();
        long d=scan.nextLong();
        long max=Long.MIN_VALUE;
        long answer;
        answer=a*c;
        if(max<answer){
            max=answer;
        }
        answer=a*d;
        if(max<answer){
            max=answer;
        }
        answer=b*c;
        if(max<answer){
            max=answer;
        }
        answer=b*d;
        if(max<answer){
            max=answer;
        }
        System.out.println(max);
    }
    public static void main(String args[]){
        Main printer = new Main();
        printer.run(args);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    void run(String[] args){
        Scanner scan=new Scanner(System.in);
        long a=scan.nextLong();
        long b=scan.nextLong();
        long c=scan.nextLong();
        long d=scan.nextLong();
        long max=Long.MIN_VALUE;
        long answer;
        answer=a*c;
        if(max<answer){
            max=answer;
        }
        answer=a*d;
        if(max<answer){
            max=answer;
        }
        answer=b*c;
        if(max<answer){
            max=answer;
        }
        answer=b*d;
        if(max<answer){
            max=answer;
        }
        System.out.println(max);
    }
    public static void main(String args[]){
        Main printer = new Main();
        printer.run(args);
    }
} Main void run(String[] args){
        Scanner scan=new Scanner(System.in);
        long a=scan.nextLong();
        long b=scan.nextLong();
        long c=scan.nextLong();
        long d=scan.nextLong();
        long max=Long.MIN_VALUE;
        long answer;
        answer=a*c;
        if(max<answer){
            max=answer;
        }
        answer=a*d;
        if(max<answer){
            max=answer;
        }
        answer=b*c;
        if(max<answer){
            max=answer;
        }
        answer=b*d;
        if(max<answer){
            max=answer;
        }
        System.out.println(max);
    } run {
        Scanner scan=new Scanner(System.in);
        long a=scan.nextLong();
        long b=scan.nextLong();
        long c=scan.nextLong();
        long d=scan.nextLong();
        long max=Long.MIN_VALUE;
        long answer;
        answer=a*c;
        if(max<answer){
            max=answer;
        }
        answer=a*d;
        if(max<answer){
            max=answer;
        }
        answer=b*c;
        if(max<answer){
            max=answer;
        }
        answer=b*d;
        if(max<answer){
            max=answer;
        }
        System.out.println(max);
    } Scanner scan=new Scanner(System.in); scan new Scanner(System.in) long a=scan.nextLong(); a scan.nextLong() scan.nextLong scan long b=scan.nextLong(); b scan.nextLong() scan.nextLong scan long c=scan.nextLong(); c scan.nextLong() scan.nextLong scan long d=scan.nextLong(); d scan.nextLong() scan.nextLong scan long max=Long.MIN_VALUE; max Long.MIN_VALUE Long Long.MIN_VALUE long answer; answer answer=a*c answer a*c a c if(max<answer){
            max=answer;
        } max<answer max answer {
            max=answer;
        } max=answer max answer answer=a*d answer a*d a d if(max<answer){
            max=answer;
        } max<answer max answer {
            max=answer;
        } max=answer max answer answer=b*c answer b*c b c if(max<answer){
            max=answer;
        } max<answer max answer {
            max=answer;
        } max=answer max answer answer=b*d answer b*d b d if(max<answer){
            max=answer;
        } max<answer max answer {
            max=answer;
        } max=answer max answer System.out.println(max) System.out.println System.out System System.out max String[] args args public static void main(String args[]){
        Main printer = new Main();
        printer.run(args);
    } main {
        Main printer = new Main();
        printer.run(args);
    } Main printer = new Main(); printer new Main() printer.run(args) printer.run printer args String args[] args public class Main {
    void run(String[] args){
        Scanner scan=new Scanner(System.in);
        long a=scan.nextLong();
        long b=scan.nextLong();
        long c=scan.nextLong();
        long d=scan.nextLong();
        long max=Long.MIN_VALUE;
        long answer;
        answer=a*c;
        if(max<answer){
            max=answer;
        }
        answer=a*d;
        if(max<answer){
            max=answer;
        }
        answer=b*c;
        if(max<answer){
            max=answer;
        }
        answer=b*d;
        if(max<answer){
            max=answer;
        }
        System.out.println(max);
    }
    public static void main(String args[]){
        Main printer = new Main();
        printer.run(args);
    }
} public class Main {
    void run(String[] args){
        Scanner scan=new Scanner(System.in);
        long a=scan.nextLong();
        long b=scan.nextLong();
        long c=scan.nextLong();
        long d=scan.nextLong();
        long max=Long.MIN_VALUE;
        long answer;
        answer=a*c;
        if(max<answer){
            max=answer;
        }
        answer=a*d;
        if(max<answer){
            max=answer;
        }
        answer=b*c;
        if(max<answer){
            max=answer;
        }
        answer=b*d;
        if(max<answer){
            max=answer;
        }
        System.out.println(max);
    }
    public static void main(String args[]){
        Main printer = new Main();
        printer.run(args);
    }
} Main
import java.util.Scanner;

public class Main {
    void run(String[] args){
        Scanner scan=new Scanner(System.in);
        long a=scan.nextLong();
        long b=scan.nextLong();
        long c=scan.nextLong();
        long d=scan.nextLong();
        long max=Long.MIN_VALUE;
        long answer;
        answer=a*c;
        if(max<answer){
            max=answer;
        }
        answer=a*d;
        if(max<answer){
            max=answer;
        }
        answer=b*c;
        if(max<answer){
            max=answer;
        }
        answer=b*d;
        if(max<answer){
            max=answer;
        }
        System.out.println(max);
    }
    public static void main(String args[]){
        Main printer = new Main();
        printer.run(args);
    }
}