fn main() { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); let s = s.trim(); let mut lefts = 0usize; let mut rights = 0usize; for i in 0..(s.len()-1)/5 { if &s[i*5..i*5+5] == "(^^*)" { lefts += 1; } else { rights += 1; } } println!("{} {}", lefts, rights); }