N = input()
a = list(map(int,input().split()))
over3200 = 0
syurui_min = 0
syurui_max = 0
b = [0] * 8
for i in a:
    if 1 <= i and i <= 399:
        b[0] = 1
    if 400 <= i and i <= 799:
        b[1] = 1
    if 800 <= i and i <= 1199:
        b[2] = 1
    if 1200 <= i and i <= 1599:
        b[3] = 1
    if 1600 <= i and i <= 1999:
        b[4] = 1
    if 2000 <= i and i <= 2399:
        b[5] = 1
    if 2400 <= i and i <= 2799:
        b[6] = 1
    if 2800 <= i and i <= 3199:
        b[7] = 1
    if 3200 <= i and i <= 4800:
        over3200 += 1
for i in b:
    if(i == 1):
        syurui_min += 1
syurui_max = syurui_min + over3200
if syurui_max >= 8:
    syurui_max = 8
if over3200 >= 1:
    syurui_min = 1
print("{0} {1}".format(syurui_min, syurui_max))
