fun main(args:Array) { val text:String = readLine()!! val a = Regex("""\(\^\^\*\)""").findAll(text).map{ x -> x.value }.toList().size val b = Regex("""\(\*\^\^\)""").findAll(text).map{ x -> x.value }.toList().size println("$a $b") }