N = int(input())
a = list(map(int,input().split()))
li = [0]*8
overrate = kind = 0
for i in range(N):
    if a[i]>=3200:
        overrate += 1
        continue
    else:
        li[a[i]//400] += 1

for j in range(8):
    if li[j]!=0:
        kind += 1

if kind==0:
    print(1,min(kind+overrate,8))
else:
    print(min(8,kind),min(kind+overrate,8))
