#include <bits/stdc++.h>

void longestRegularBracket(string inputString, int &length, int &count)

{

stack<int> s;

s.push(-1);

for(int i = 0; i < inputString.size(); i++){

if(inputString[i] == '(') s.push(i);

else{

if(!s.empty()) s.pop();

if(!s.empty()){

int curr = i - s.top();

if(curr > length){

length = curr;

count = 0;

}

if(curr == length) count++;

}

else s.push(i);

}

}

if(length == 0) count = 1;

}