V = gets puts "#{V.count("(^^*)")} #{V.count("(*^^)")}"