N = int(input())
A = list(map(int,input().split()))
ans,k = [0]*7,0
for a in A:
    if a>=3200: k+=1
    elif a>=2800: ans[6] = 1
    elif a>=2400: ans[5] = 1
    elif a>=2000: ans[4] = 1
    elif a>=1600: ans[3] = 1
    elif a>=1200: ans[2] = 1
    elif a>=800 : ans[1] = 1
    elif a>=400 : ans[0] = 1
print(max(sum(ans),1),sum(ans)+k)