n = int(input())
s = list(map(int,input().split()))

tmp = [0]*8
r = 0
for i in s:
    if i <= 399:
        tmp[0] = 1
    elif i <= 799:
        tmp[1] = 1
    elif i <= 1199:
        tmp[2] = 1    
    elif i <= 1599:
        tmp[3] = 1        
    elif i <= 1999:
        tmp[4] = 1
    elif i <= 2399:
        tmp[5] = 1
    elif i <= 2799:
        tmp[6] = 1
    elif i <= 3199:
        tmp[7] = 1
    else:
        r += 1

ans_min = sum(tmp)
ans_max = sum(tmp) + r

print(ans_min, ans_max)