N = input()
a = list(map(int,input().split()))
over3200 = 0
syurui_min = 0
syurui_max = 0
b = [0] * 8
for i in a:
    if 3200 <= i and i <= 4800:
        over3200 += 1
    else:
        b[min(i // 400)] = 1
for i in b:
    if(i == 1):
        syurui_min += 1
syurui_max = syurui_min + over3200
if syurui_min == 0:
    syurui_min = 1
print("{0} {1}".format(syurui_min, syurui_max))
