#include<stdio.h>#include<string.h>int main(){ char str[1000000]={}; int i,h=0,o=0; scanf("%s",str); for(i=0;str[i]!=NULL;i++) { if(str[i]=='(') { h++; } else if(str[i]==')') { o++; } } printf("%d %d",h,o); return 0;}