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

L = []
for i, v in enumerate(A):
    if (1 <= v and v <= 399):
        L.append('灰色')
    elif(400 <= v and v <= 799):
        L.append('茶色')
    elif(800 <= v and v <= 1199):
        L.append('緑色')
    elif(1200 <= v and v <= 1599):
        L.append('水色')
    elif(1600 <= v and v <= 1999):
        L.append('青色')
    elif(2000 <= v and v <= 2399):
        L.append('黄色')
    elif(2400 <= v and v <= 2799):
        L.append('橙色')
    elif(2800 <= v and v <= 3199):
        L.append('赤色')
    else:
        L.append('自由')

J = [i for i in L if i == '自由']
L = list(set(L))
if ('自由' in L):
    L.remove('自由')

print(len(L), len(L) + len(J))
