N = int(input())
a = input().split()
b = []
for ii in range(9):
    b.append(0)
for ii in range(N):
    if int(a[ii]) < 400:
        b[0] = b[0] + 1
    elif int(a[ii]) < 800:
        b[1] = b[1] + 1
    elif int(a[ii]) < 1200:
        b[2] = b[2] + 1
    elif int(a[ii]) < 1600:
        b[3] = b[3] + 1
    elif int(a[ii]) < 2000:
        b[4] = b[4] + 1
    elif int(a[ii]) < 2400:
        b[5] = b[5] + 1
    elif int(a[ii]) < 2800:
        b[6] = b[6] + 1
    elif int(a[ii]) < 3200:
        b[7] = b[7] + 1
    else:
        b[8] = b[8] + 1
min = 0
max = 0
for ii in range(8):
    if b[ii] > 0:
        min = min + 1
        max = max + 1
max = max + b[8]
print(str(min) + ' ' + str(max))