import numpy as np
 
n = int(input())
a = list(int(i) for i in input().split()) 
a.sort()
minCount = 0
maxCount = 0
count = np.zeros(9)

for i in range(n) :
    if a[i] < 400 :
        count[0] = count[0] + 1
    elif a[i] < 800 :
        count[1] = count[1] + 1
    elif a[i] < 1200 :
        count[2] = count[2] + 1
    elif a[i] < 1600 :
        count[3] = count[3] + 1
    elif a[i] < 2000 :
        count[4] = count[4] + 1
    elif a[i] < 2400 :
        count[5] = count[5] + 1
    elif a[i] < 2800 :
        count[6] = count[6] + 1
    elif a[i] < 3200 :
        count[7] = count[7] + 1
    elif a[i] < 4801 :
        count[8] = count[8] + 1

for i in range(8) :
    if count[i] > 0 :
        minCount = minCount + 1
        maxCount = maxCount + 1

maxCount = maxCount + count[8]

#print (a)
print (minCount, end =' ')
print (int(maxCount))