N = int(input())
a = list(map(int,input().split()))

color = [0] * 8
ext = 0
for i in range(N):
    for j in range(1,9):
        if a[i] < (j*400):
            color[j-1] += 1
            break
    else:
        ext += 1 
        
        
cnt = 0
for i in color:
    if i > 0:
        cnt += 1
        
minim = max(0,cnt+1 * int(ext>0 and cnt == 0))
maxim = min(8,cnt+ext)

print(minim,maxim)