n = int(input())
a = list(map(int, input().split()))
rate = [0 for i in range(9)]
mn,mx = 0,0

for i in range(n):
    if 1<=a[i] and a[i]<=399:
        rate[0] = 1
    elif 400<=a[i] and a[i]<=799:
        rate[1] = 1
    elif 800<=a[i] and a[i]<=1199:
        rate[2] = 1
    elif 1200<=a[i] and a[i]<=1599:
        rate[3] = 1
    elif 1600<=a[i] and a[i]<=1999:
        rate[4] = 1
    elif 2000<=a[i] and a[i]<=2399:
        rate[5] = 1
    elif 2400<=a[i] and a[i]<=2799:
        rate[6] = 1
    elif 2800<=a[i] and a[i]<=3199:
        rate[7] = 1
    else:
        rate[8] += 1
print(rate)

for i in range(len(rate)-1):
    if rate[i] == 1:
        mn += 1
print('{0} {1}'.format(mn,mn+rate[8]))
