import math
N = int(input())
A = list(map(int, input().split()))
a_lst = [0 for i in range(9)]

for i in A:
    if 1 <= i <= 399:
        a_lst[0] += 1
    elif 400 <= i <= 799:
        a_lst[1] +=1
    elif 800 <= i <= 1199:
        a_lst[2] +=1
    elif 1200 <= i <= 1599:
        a_lst[3] +=1
    elif 1600 <= i <= 1999:
        a_lst[4] +=1
    elif 2000 <= i <= 2399:
        a_lst[5] +=1
    elif 2400 <= i <= 2799:
        a_lst[6] +=1
    elif 2800 <= i <= 3199:
        a_lst[7] +=1
    else:
        a_lst[8] +=1

mn = len([0 for i in a_lst[:-1] if i > 0])
mx = mn + a_lst[-1]
print(mn, mx)
