n = int(input())
a = list(map(int,input().split()))
d = {}
for i in range(8):
    d[i] = []
for i in range(len(a)):
    if(a[i]<=399):
        d[0].append(a[i])
    elif(a[i]<=799):
        d[1].append(a[i])
    elif(a[i]<=1199):
        d[2].append(a[i])
    elif(a[i]<=1599):
        d[3].append(a[i])
    elif(a[i]<=1999):
        d[4].append(a[i])
    elif(a[i]<=2399):
        d[5].append(a[i])
    elif(a[i]<=2799):
        d[6].append(a[i])
    elif(a[i]<=3199):
        d[7].append(a[i])
mini = 0
maxi = 0
for key in d:
    if(d[key]!=[]):
        mini+=1
maxi = mini
if(mini==8):
    print(mini,maxi)
    exit()
for i in range(len(a)):
    if(a[i]>=3200):
        maxi+=1
print(mini,maxi)
