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

l = [False] * 8
top = 0
for i, val in enumerate(a):
    if 1 <= val <= 399:
        l[0] = True
    if 400 <= val <= 799:
        l[1] = True
    if 800 <= val <= 1199:
        l[2] = True
    if 1200 <= val <= 1599:
        l[3] = True
    if 1600 <= val <= 1999:
        l[4] = True
    if 2000 <= val <= 2399:
        l[5] = True
    if 2400 <= val <= 2799:
        l[6] = True
    if 2800 <= val <= 3199:
        l[7] = True
    if 3200 <= val:
        top += 1

mini = l.count(True)
ma = l.count(True) + top
print("{} {}".format(mini, ma))