n = int(input()) s1 = 0 s2 = 0 for i in range(1, n + 1): x = int(input()) if x >= 10 and x <= 20: s1 += 1 else: s2 += 1 print(“%d in”%s1) print(“%d out”%s2)