from sys import stdin
N = int(stdin.readline().rstrip())
a = [int(x) for x in stdin.readline().rstrip().split()]
hai = 0
cha = 0
mdr = 0
miz = 0
aao = 0
kii = 0
dai = 0
aka = 0
kan = 0

for i in a:
    if i <= 399:
        hai = 1
    elif i <= 799:
        cha = 1
    elif i <= 1199:
        mdr = 1
    elif i <= 1599:
        miz = 1
    elif i <= 1999:
        aao = 1
    elif i <= 2399:
        kii = 1
    elif i <= 2799:
        dai = 1
    elif i <= 3199:
        aka = 1
    else:
        kan += 1

ans1 = kan+aka+dai+kii+aao+miz+mdr+cha+hai
ans2 = aka+dai+kii+aao+miz+mdr+cha+hai
print(ans2,ans1)