memTime = int(input())
memLate = input().split()
memLate = [int(i) for i in memLate]
colorList = []
memColor = 0
highLate = 0
for color in memLate:
    print((color // 400) in colorList)
    if color // 400 >= 8:
        highLate += 1
    elif ((color // 400) in colorList) == False:
        colorList.append(color // 400)
print(colorList)
maxColor = len(colorList) + highLate
print(str(len(colorList)) + " " + str(maxColor))