n=int(input())
a=[int(i) for i in input().split()]
a.sort()
c=[]
cc=1
l=0
ccc=0
for i in range(399,3200,400):
    for j in range(n):
        if i-400<a[j] and a[j]<=i:
            c.append(i)
            ccc=j
for i in range(ccc):
    if c[i]!=c[i+1]:
        cc+=1
print(cc,min(8,cc+n-(ccc+1)))