n = input()
a = list(map(int, input().split()))
a = sorted(a)
count = [0] * 9
for i in a:
    if i < 3200:
        count[i//400] = 1
    else:
        count[8] += 1
ansMax = min(8, sum(count))
ansMin = sum(count[:8])
if ansMin==0 and count[8] > 0:
    ansMin = 1
print(ansMin, ansMax)
        
