N = int(input())
a = list(map(int, input().split()))
c = [0] * 9
for i in range(N):
    if a[i] >= 3200:
        c[8] += 1
    else:
        for j in range(8):
            if 400 * j <= a[i] and a[i] <= 400 * (j + 1) - 1:
                c[j] = 1
min1 = max(1, sum(c[:8]))
max1 = sum(c)
print(min1, max1)

f8535a8ed6a0d0e5489543f22b797d16f2fc6cf9
<mask token>

<mask token>
for i in range(N):
    if a[i] >= 3200:
        c[8] += 1
    else:
        for j in range(8):
            if 400 * j <= a[i] and a[i] <= 400 * (j + 1) - 1:
                c[j] = 1
<mask token>
print(min1, max1)

N = int(input())
a = list(map(int, input().split()))
c = [0] * 9
for i in range(N):
    if a[i] >= 3200:
        c[8] += 1
    else:
        for j in range(8):
            if 400 * j <= a[i] and a[i] <= 400 * (j + 1) - 1:
                c[j] = 1
min1 = max(1, sum(c[:8]))
max1 = sum(c)
print(min1, max1)
