import strutils, math proc input: auto = stdin.readLine var done, miss = 0 let N = input().parseInt for i in 0 ..< N: let TS = input().split (T, S) = (TS[0].parseInt, TS[1].len) m = (S.toFloat - T * 12 / 1000).ceil.int if m <= 0: done += S else: done += S - m miss += m echo done, " ", miss