N = int(input())
A = list(map(int,input().split()))[:N]

i = 0
color = 0
T = list(filter(lambda x:x>=3200,A))
A = list(filter(lambda x:x<3200,A))
while(len(A)>0):
    for R in range(0,2801,400):
        if A[i] >= R and A[i] < R+400:
            A = list(filter(lambda x:x>=R+400,A))
            i=-1
            color+=1
            break
    i+=1
    
min_color = color
max_color = color+len(T)

if min_color==0 and len(T)>0: min_color = 1
if max_color>8: max_color = 8
    
print(min_color,max_color)