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

b = [0]*9

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

if b[8] == 0:
        print(str(9-b.count(0))+" "+str(9-b.count(0)))
else:
        print(str(8-b.count(0))+" "+str(8-b.count(0)+b[8]))