import sys
input = sys.stdin.readline

N = int(input())
nums = list(map(int, input().split()))
colors = [0]*9
mi = 0
ma = 0

for i in range(N):
    a = nums[i]
    if a < 400:
        colors[0] += 1
    elif a < 800:
        colors[1] += 1
    elif a < 1200:
        colors[2] += 1
    elif a < 1600:
        colors[3] += 1
    elif a < 2000:
        colors[4] += 1
    elif a < 2400:
        colors[5] += 1
    elif a < 2800:
        colors[6] += 1
    elif a < 3200:
        colors[7] += 1
    else:
        colors[8] += 1

for j in range(8):
    if colors[j] > 0:
        mi += 1
ma = mi
ma += colors[8]

print(mi, ma)