w =  int(input())
num = input().split(' ')
b = [int(x) for x in num]
a1 = [0, 399, 799, 1199, 1599, 1999, 2399, 2799, 3199]
a2 = [0, 0 ,0, 0 ,0, 0 ,0, 0 ]
a3 = 0 
for e in range(1, 9):
    for i in range(len(b)):
        if b[i] <= a1[e] and b[i] > a1[e -1] :
            a2[e] = 1
        elif b[i] > 3199:
            a3 += 1

mi = int(sum(a2))
ma = int(mi + a3)
print(mi,  ma)
