n=int(input())
a=list(map(int,input().split()))
c=[]
for i in range(n):
    if a[i]<=399:
        c.append('gray')
    elif a[i]<=799:
        c.append('br') 
    elif a[i]<=1199:
        c.append('green')
    elif a[i]<=1599:
        c.append('pb')
    elif a[i]<=1999:
        c.append('bl')
    elif a[i]<=2399:
        c.append('y')
    elif  a[i]<=2799:
        c.append('o')
    elif  a[i]<=3199:
        c.append('r')
x=n-len(c)
#3200以上の人数
c=list(set(c))
k=min(8,len(c)+x)
print(len(c),k)