str = "/" + gets.chomp if str=="/#" then puts "0 0" else str.gsub!("(^^*)","l").gsub!("(*^^)","r") puts "#{str.count("l")} #{str.count("r")}" end