n = int(input())
a = list(map(int,input().split()))
cnt = [0,0,0,0,0,0,0,0]
count = 0
num = 0

for i in a:
    if 1 <= i <= 399:
        cnt[0] += 1
    elif 400<= i <= 799:
        cnt[1] += 1
        
    elif 800<= i <= 1199:
        cnt[2] += 1
        
    elif 1200<= i <= 1599:
        cnt[3] += 1
        
    elif 1600<= i <= 1999:
        cnt[4] += 1
        
    elif 2000<= i <= 2399:
        cnt[5] += 1
        
    elif 2400<= i <= 2799:
        cnt[6] += 1
       
    elif 2800 <= i <= 3199:
        cnt[7] += 1
        
    else:
        count += 1
for i in range(len(cnt)):
    if cnt[i] > 0:
        num +=1
print(num,num+count)
    