n = int(input())

a = map(int, input().split())
d = {0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0}

for i in a:
    if i <=399:
        d[0]=1
    elif 400<=i<=799:
        d[1]=1
    elif 800<=i<=1199:
        d[2]=1
    elif 1200<=i<=1599:
        d[3]=1
    elif 1600<=i<=1999:
        d[4]=1
    elif 2000<=i<=2399:
        d[5]=1
    elif 2400<=i<=2799:
        d[6]=1
    elif 2800<=i<=3199:
        d[7]=1
    elif 3200<=i:
        d[8]=d[8]+1
ans_min = -1
ans_max = -1
cnt = 0
for key, value in d.items():
    if key != 8:
        cnt += value
    else:
        ans_min = max(cnt,1)
        ans_max = min(cnt+value,8)
if ans_min == -1:
    print(str(cnt) + ' ' + str(cnt))
else:
    print(str(ans_min) + ' ' + str(ans_max))
