package main import "fmt" func main() { var r, l int var s string fmt.Scan(&s) rsmile := "(^^*)" for i := 0; i+len(rsmile)-1 < len(s); i++ { if s[i:i+len(rsmile)] == rsmile { l++ } else { r++ } i += len(rsmile) - 1 } fmt.Println(l, r) }