a = [i for i in range(1, 399)]
b = [i for i in range(400, 799)]
c = [i for i in range(800, 1199)]
d = [i for i in range(1200, 1599)]
e = [i for i in range(1600, 1999)]
f = [i for i in range(2000, 2399)]
g = [i for i in range(2400, 2799)]
h = [i for i in range(2800, 3199)]
count = 0
n = int(input())
A = list(map(int, input().split()))
color = [0 for i in range(8)]
for i in range(len(A)):
    if A[i] in a:
        color[0] += 1
    elif A[i] in b:
        color[1] += 1
    elif A[i] in c:
        color[2] += 1
    elif A[i] in d:
        color[3] += 1
    elif A[i] in e:
        color[4] += 1
    elif A[i] in f:
        color[5] += 1
    elif A[i] in g:
        color[6] += 1
    elif A[i] in h:
        color[7] += 1
    else:
        count += 1
print(len(color) - color.count(0), len(color) - color.count(0) + count)