from collections import defaultdict

n = int(input())
aa = list(map(int, input().split()))

d = defaultdict(int)


def rating(num):
    if num < 400:
        d[1] = 1
    elif num < 800:
        d[2] = 1
    elif num < 1200:
        d[3] = 1
    elif num < 1600:
        d[4] = 1
    elif num < 2000:
        d[5] = 1
    elif num < 2400:
        d[6] = 1
    elif num < 2800:
        d[7] = 1
    elif num < 3200:
        d[8] = 1
    else:
        d[0] += 1


for a in aa:
    rating(a)

free = d[0]
cnt = len(d)-1


if free == 0:
    print(cnt, cnt)
elif cnt == 0:
    print(1, min(8, free))
    exit()
else:
    print(cnt, min(8, cnt+free))
