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

l = [0] * 9
p = 0
for i in range(0,n):
    q = a[i] // 400
    if q < 8:
        l[q] = 1
    else:
        l[8] = 1
        p = p + 1

s = sum(l[0:8])
m = max([s,l[8]])
M = min([8,s+p])
print(m,M)
