Problem: This is yet another problem dealing with regular bracket sequences.

We should remind you that a bracket sequence is called regular, if by inserting «+» and «1» into it we can get a correct mathematical expression. For example, sequences «(())()», «()» and «(()(()))» are regular, while «)(», «(()» and «(()))(» are not. 

You are given a string of «(» and «)» characters. You are to find its longest substring that is a regular bracket sequence. You are to find the number of such substrings as well.

Input

The first line of the input file contains a non-empty string, consisting of «(» and «)» characters. Its length does not exceed 106.

Output

Print the length of the longest substring that is a regular bracket sequence, and the number of such substrings. If there are no such substrings, write the only line containing "0 1".

Examples

Input

)((())))(()())


Output

6 2


Input

))(


Output

0 1

Solution (in JAVA):

Solution:
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Vector;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Stack;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            String s = in.n();
            int len = s.length();
            Stack<Integer> stack = new Stack<>();
            int[] c = new int[len];
            int[] d = new int[len];
            for (int i = 0; i < len; i++) {
                if (s.charAt(i) == '(')
                    stack.push(i);
                else {
                    if (stack.isEmpty()) {
                        c[i] = -1;
                        d[i] = -1;
                    } else {
                        d[i] = stack.pop();
                        c[i] = d[i];
                        if (d[i] - 1 >= 0 && s.charAt(d[i] - 1) == ')' && c[d[i] - 1] != -1)
                            c[i] = c[d[i] - 1];
                    }
                }
            }
            int max = 0;
            int count = 1;
            for (int i = 0; i < len; i++) {
                if (c[i] != -1 && s.charAt(i) == ')') {
                    int current = i - c[i] + 1;
                    if (current > max) {
                        max = current;
                        count = 1;
                    } else if (current == max)
                        count++;
                }
            }
            out.println(max + " " + count);
        }

    }

    static class InputReader {
        BufferedReader br;
        StringTokenizer st;

        public InputReader(InputStream inputStream) {
            br = new BufferedReader(new InputStreamReader(inputStream));
        }

        public String n() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

    }
}