N = int(input())
a = list(map(int, input().split()))

color = set()
mx = 0

for i in a:
    if 1 <= i <= 399:
        color.add('a')
    elif 400 <= i <= 799:
        color.add('b')
    elif 800 <= i <= 1199:
        color.add('c')
    elif 1200 <= i <= 1599:
        color.add('d')
    elif 1600 <= i <= 1999:
        color.add('e')
    elif 2000 <= i <= 2399:
        color.add('f')
    elif 2400 <= i <= 2799:
        color.add('g')
    elif 2800 <= i <= 3199:
        color.add('h')
    elif 3200 <= i:
        mx += 1

cn = len(color)
cx = cn + mx

print(cn, cx)