a = int(input())
ar = list(map(int,input().split(" ")))
br = []
count = 0
for r in ar:
    if r >= 1 and r <= 399:
        br.append("g")
    elif r >= 400 and r <= 799:
        br.append("b")
    elif r >= 800 and r <= 1199:
        br.append("gr")
    elif r >= 1200 and r <= 1599:
        br.append("w")
    elif r >= 1600 and r <= 1999:
        br.append("bl")
    elif r >= 2000 and r <= 2399:
        br.append("y")
    elif r >= 2400 and r <= 2799:
        br.append("o")
    elif r >= 2800 and r <= 3199:
        br.append("r")
    else:
        count += 1
print(len(set(br)),count)
if len(set(br)) == 0:
    print(1,count)
else:
    print(len(set(br)),len(set(br)) + count)