public static String task2(String expression) {
        int openBrackets = 0;
        for(int i=0; i<expression.length(); i++) {
            if(expression.charAt(i) == '(') {
                openBrackets ++;
            }
            if(expression.charAt(i) == ')' && openBrackets>0) {
                openBrackets --;
            }
            else if(expression.charAt(i) == ')' && openBrackets==0) {
                return "No. You have spare closing bracket in position " + i;
            }
        }
        if(openBrackets>0) {
            return "No. You have " + openBrackets + " open bracket(s) in your expression";
        }
        else {
            return "Yes";
        }
    }