using System; using System.Text; public class Program { const double typeAbility = 0.012; public static void Main(string[] args) { var n = int.Parse(Console.ReadLine()); var strs = new StringBuilder(); var typed = 0; var totalTyped = 0; string[] input; for (int i = 0; i < n; i++) { input = Console.ReadLine().Split(' '); typed = (int)(typeAbility * int.Parse(input[0])); totalTyped += (typed >= input[1].Length) ? input[1].Length : typed; strs.Append(input[1]); } Console.WriteLine("{0} {1}", totalTyped, strs.Length - totalTyped); } }