#include <iostream>
#include <cstring>
#include <string>

using namespace std;

int main()
{
	char S[100000+1];
	cin >> S;

	/*
	   (^^*)が左向きで、
(*^^)が右向きです。
*/

	
	char *s;
	int cnt = 0;

	s = S;
	cnt = 0;
	while( ( s = strstr( s, "*)") )!= NULL ) {
		cnt++;
		s+=1;
	}
	cout << cnt << " ";

	cnt = 0;
	s = S;
	while( ( s = strstr( s, "(*") )!= NULL ) {
		cnt++;
		s+=1;
	}
	cout << cnt << endl;

	return 0;
}