n = int(input()) ci = co = 0 for i in range (n): x = int(input()) if x >= 10 and x <= 20: ci += 1 else: co += 1 print (ci, "in") print (co, "out")