n = int(input())

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

l = [0]*9

for i in a:
    if i >= 3200:
        l[8] +=1
    else:    
        l[i//400] +=1

b = [i for i in l[:8] if i > 0]

mx = len(b)+l[8]
mn = len(b)
print(mn,mx)