n = int(input())
a = list(map(int,input().split()))

t1 = []
t2 = []
t3 = []
t4 = []
t5 = []
t6 = []
t7 = []
t8 = []
t9 = []
counter = 0

for i in range(n):
    if 1 <= a[i] <= 399:
        t1.append(a[i])
    elif 400 <= a[i] <= 799:
        t2.append(a[i])
    elif 800 <= a[i] <= 1199:
        t3.append(a[i])
    elif 1200 <= a[i] <= 1599:
        t4.append(a[i])
    elif 1600 <= a[i] <= 1999:
        t5.append(a[i])
    elif 2000 <= a[i] <= 2399:
        t6.append(a[i])
    elif 2400 <= a[i] <= 2799:
        t7.append(a[i])
    elif 2800 <= a[i] <= 3199:
        t8.append(a[i])
    else:
        t9.append(a[i])
        
if t1:
    counter +=1
if t2:
    counter +=1
if t3:
    counter +=1
if t4:
    counter +=1
if t5:
    counter +=1
if t6:
    counter +=1
if t7:
    counter +=1
if t8:
    counter +=1

niji = len(t9)
print(max(counter,1),min(8,counter + niji))