fn main() { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); let s = s.trim(); let l = s.matches("(^^*)").count(); let r = s.matches("(*^^)").count(); println!("{} {}", l, r); }