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:
public class Driver {

	static java.util.Deque<Integer> stack = new java.util.ArrayDeque<Integer>();
	static int[] d;
	static int max, l, count, consect, e;
	static char[] seq;
	
	public static void main(String[] args) throws java.io.IOException {
		java.io.InputStreamReader isr = new java.io.InputStreamReader(System.in);
		java.io.BufferedReader in = new java.io.BufferedReader(isr);

		seq = in.readLine().toCharArray();
		l = seq.length;
		d = new int[l];
		for (int i = 0; i < l; i++) {
			if (seq[i] == '(') {
				stack.push(i);
				d[i] = -1;
			} else {
				if (stack.isEmpty()) {
					d[i] = -1;
				} else {
					d[i] = stack.poll();
					d[d[i]] = -3;
				}
			}
		}
		max = count = 0;
		int j;
		for (int i = 0; i < l; i++) {
			if (d[i] == -3) {
				consect = 0;
				j = i;
				while (true) {
					consect++;
					if (d[++j] == -1 || j == l-1) {
						if (j == l-1)
							consect++;
						i = j;
						if (consect == max) {
							count++;
						}
						if (consect > max) {
							max = consect;
							count = 1;
						}
						break;
					}
				}
			}
		}
		if (count > 0)
			System.out.println(max + " " + count);
		else
			System.out.println("0 1");
		in.close();
	}
}