N = int(input())
a = list(map(int, input().split()))
rate = [0] * 9
for ai in a:
    if ai < 400:
        rate[0] = 1
    elif ai < 800:
        rate[1] = 1
    elif ai < 1200:
        rate[2] = 1
    elif ai < 1600:
        rate[3] = 1
    elif ai < 2000:
        rate[4] = 1
    elif ai < 2400:
        rate[5] = 1
    elif ai < 2800:
        rate[6] = 1
    elif ai < 3200:
        rate[7] = 1
    else:
        rate[8] += 1

if rate[8]:
    maxv = min(rate[8], len(list(filter(lambda x: x == 0, rate))))
    minv = sum(rate[:8])
    print(minv, minv + maxv)
else:
    ans = sum(rate)
    print(ans, ans)
