n = int(input())
*a, = map(int, input().split())

color = [0]*9
for i in range(n):
    if a[i] < 400:
        color[0] += 1
    elif 400 <= a[i] < 800:
        color[1] += 1
    elif 800 <= a[i] < 1200:
        color[2] += 1
    elif 1200 <= a[i] < 1600:
        color[3] += 1
    elif 1600 <= a[i] < 2000:
        color[4] += 1
    elif 2000 <= a[i] < 2400:
        color[5] += 1
    elif 2400 <= a[i] < 2800:
        color[6] += 1
    elif 2800 <= a[i] < 3200:
        color[7] += 1
    else:
        color[8] += 1

k = len(list(filter(lambda x: x > 0, color[:-1])))
print(k, k + color[-1])
