using System; public class Hello { public static void Main() { var n = int.Parse(Console.ReadLine().Trim()); var ok = 0; var ng = 0; for (int i = 0; i < n; i++) { string[] line = Console.ReadLine().Trim().Split(' '); var t = int.Parse(line[0]); var sL = line[1].Length; var cantype = 12 * t / 1000; var tempok = Math.Min(sL, cantype); ok += tempok; ng += sL - tempok; } Console.WriteLine("{0} {1}", ok, ng); } }