N = int(input())
a = list(map(int, input().split()))
num = [0] * 9
for i in range(N):
    if 1 <= a[i] <= 399:
        num[0] = 1
    elif 400 <= a[i] <= 799:
        num[1] = 1
    elif 800 <= a[i] <= 1199:
        num[2] = 1
    elif 1200 <= a[i] <= 1599:
        num[3] = 1
    elif 1600 <= a[i] <= 1999:
        num[4] = 1
    elif 2000 <= a[i] <= 2399:
        num[5] = 1
    elif 2400 <= a[i] <= 2799:
        num[6] = 1
    elif 2800 <= a[i] <= 3199:
        num[7] = 1
    else:
        num[8] = num[8] + 1

if num[8] == 0:
    maximum = sum(num[0:8])
    minimum = sum(num[0:8])
else:
    if num[8] == N:
        maximum = 1
        minimum = 1
    else:
        minimum = sum(num[0:8])
        if sum(num[0:8]) + num[8] <= 8:
            maximum = sum(num[0:8]) + num[8]
        else:
            maximum = 8

print(minimum, maximum)
