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

color = {1:[],2:[], 3:[],4:[],5:[],6:[],7:[],8:[]}
suki = []
iroiro = 0
for i in range(n):
    if a[i] < 1600:
        if a[i] < 800:
            if a[i] < 400:
                color[1].append(a[i])
            else:
                color[2].append(a[i])
        else:
            if a[i] < 1200:
                color[3].append(a[i])
            else:
                color[4].append(a[i])
    else:
        if a[i] < 2400:
            if a[i] < 2000:
                color[5].append(a[i])
            else:
                color[6].append(a[i])
        else:
            if a[i] < 2800:
                color[7].append(a[i])
            elif 2800 <= a[i] < 3200:
                color[8].append(a[i])
            else:
                suki.append(a[i])

for k in color.keys():
    if len(color[k]) != 0:
        iroiro += 1
    else:
        pass
Co = len(suki)
ans = iroiro + Co
print(iroiro,ans)

