import java.util.*;
public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc =new Scanner(System.in);
        long[] line =new long[4];
        for (int i = 0; i < 4; i++) {
            line[i] = sc.nextLong();  
        }
        long max = Long.MIN_VALUE;
        
        for (int i = 0; i < 2; i++) {
            for (int j = 2; j < 4; j++) {
                max = Math.max(max, line[i]*line[j]);
            }
        }

        System.out.println(max);
		sc.close();
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc =new Scanner(System.in);
        long[] line =new long[4];
        for (int i = 0; i < 4; i++) {
            line[i] = sc.nextLong();  
        }
        long max = Long.MIN_VALUE;
        
        for (int i = 0; i < 2; i++) {
            for (int j = 2; j < 4; j++) {
                max = Math.max(max, line[i]*line[j]);
            }
        }

        System.out.println(max);
		sc.close();
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc =new Scanner(System.in);
        long[] line =new long[4];
        for (int i = 0; i < 4; i++) {
            line[i] = sc.nextLong();  
        }
        long max = Long.MIN_VALUE;
        
        for (int i = 0; i < 2; i++) {
            for (int j = 2; j < 4; j++) {
                max = Math.max(max, line[i]*line[j]);
            }
        }

        System.out.println(max);
		sc.close();
    } main {
        Scanner sc =new Scanner(System.in);
        long[] line =new long[4];
        for (int i = 0; i < 4; i++) {
            line[i] = sc.nextLong();  
        }
        long max = Long.MIN_VALUE;
        
        for (int i = 0; i < 2; i++) {
            for (int j = 2; j < 4; j++) {
                max = Math.max(max, line[i]*line[j]);
            }
        }

        System.out.println(max);
		sc.close();
    } Scanner sc =new Scanner(System.in); sc new Scanner(System.in) long[] line =new long[4]; line new long[4] 4 for (int i = 0; i < 4; i++) {
            line[i] = sc.nextLong();  
        } int i = 0; int i = 0; i 0 i < 4 i 4 i++ i++ i {
            line[i] = sc.nextLong();  
        } {
            line[i] = sc.nextLong();  
        } line[i] = sc.nextLong() line[i] line i sc.nextLong() sc.nextLong sc long max = Long.MIN_VALUE; max Long.MIN_VALUE Long Long.MIN_VALUE for (int i = 0; i < 2; i++) {
            for (int j = 2; j < 4; j++) {
                max = Math.max(max, line[i]*line[j]);
            }
        } int i = 0; int i = 0; i 0 i < 2 i 2 i++ i++ i {
            for (int j = 2; j < 4; j++) {
                max = Math.max(max, line[i]*line[j]);
            }
        } {
            for (int j = 2; j < 4; j++) {
                max = Math.max(max, line[i]*line[j]);
            }
        } for (int j = 2; j < 4; j++) {
                max = Math.max(max, line[i]*line[j]);
            } int j = 2; int j = 2; j 2 j < 4 j 4 j++ j++ j {
                max = Math.max(max, line[i]*line[j]);
            } {
                max = Math.max(max, line[i]*line[j]);
            } max = Math.max(max, line[i]*line[j]) max Math.max(max, line[i]*line[j]) Math.max Math max line[i]*line[j] line[i] line i line[j] line j System.out.println(max) System.out.println System.out System System.out max sc.close() sc.close sc String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc =new Scanner(System.in);
        long[] line =new long[4];
        for (int i = 0; i < 4; i++) {
            line[i] = sc.nextLong();  
        }
        long max = Long.MIN_VALUE;
        
        for (int i = 0; i < 2; i++) {
            for (int j = 2; j < 4; j++) {
                max = Math.max(max, line[i]*line[j]);
            }
        }

        System.out.println(max);
		sc.close();
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc =new Scanner(System.in);
        long[] line =new long[4];
        for (int i = 0; i < 4; i++) {
            line[i] = sc.nextLong();  
        }
        long max = Long.MIN_VALUE;
        
        for (int i = 0; i < 2; i++) {
            for (int j = 2; j < 4; j++) {
                max = Math.max(max, line[i]*line[j]);
            }
        }

        System.out.println(max);
		sc.close();
    }
} Main
import java.util.*;
public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc =new Scanner(System.in);
        long[] line =new long[4];
        for (int i = 0; i < 4; i++) {
            line[i] = sc.nextLong();  
        }
        long max = Long.MIN_VALUE;
        
        for (int i = 0; i < 2; i++) {
            for (int j = 2; j < 4; j++) {
                max = Math.max(max, line[i]*line[j]);
            }
        }

        System.out.println(max);
		sc.close();
    }
}
