n = int(input())
a = list(map(int,input().split()))
t = [0] * 8
p = 0

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

z = t.count(0)
amin = 8 - z
if z >= p:
    amax = amin + p
else:
    amax = 8
print(amin,amax)