n=int(input())
a=list(map(int,input().split()))
c=[]
for i in range(n):
    if a[i]<=399:
        c.append('glay')
    elif a[i]<=799:
        c.append('brown') 
    elif a[i]<=1199:
        c.append('green')
    elif a[i]<=1599:
        c.append('pblue')
    elif a[i]<=1999:
        c.append('blue')
    elif a[i]<=2399:
        c.append('yellow')
    elif  a[i]<=2799:
        c.append('orange')
    elif  a[i]<=3199:
        c.append('red')
x=n-len(c)
c=list(set(c))
k=len(c)+min(5,x)
print(len(c),k)