a = int(eval(input()))

b = list(map(int, input().split()))

c = {0: 0, 1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0}

d = 0

for i in b:

    if 1 <= i <= 399:

        c[0] += 1

    elif 400 <= i <= 799:

        c[1] += 1

    elif 800 <= i <= 1199:

        c[2] += 1

    elif 1200 <= i <= 1599:

        c[3] += 1

    elif 1600 <= i <= 1999:

        c[4] += 1

    elif 2000 <= i <= 2399:

        c[5] += 1

    elif 2400 <= i <= 2799:

        c[6] += 1

    elif 2800 <= i <= 3199:

        c[7] += 1

    else:

        d += 1

e = 0

for k, v in list(c.items()):

    if v != 0:

        e += 1

print((str(max(e, 1)) + " " + str(e + d)))

a = int(eval(input()))

b = list(map(int, input().split()))

c = {}

for i in b:

    if 1 <= i <= 399:

        c[0] = 1

    elif 400 <= i <= 799:

        c[1] = 1

    elif 800 <= i <= 1199:

        c[2] = 1

    elif 1200 <= i <= 1599:

        c[3] = 1

    elif 1600 <= i <= 1999:

        c[4] = 1

    elif 2000 <= i <= 2399:

        c[5] = 1

    elif 2400 <= i <= 2799:

        c[6] = 1

    elif 2800 <= i <= 3199:

        c[7] = 1

    else:

        if 8 not in c:

            c[8] = 1

        else:

            c[8] += 1

count = 0

se = 0

for k, v in list(c.items()):

    if k == 8:

        se = v

    else:

        count += 1

if se == 0:

    print(("{} {}".format(count, count)))

else:

    if count == 0:

        print(("{} {}".format(1, se)))

    else:

        print(("{} {}".format(count, count + se)))

a = int(eval(input()))
b = list(map(int, input().split()))
c = {0: 0, 1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0}
d = 0
for i in b:
    if 1 <= i <= 399:
        c[0] += 1
    elif 400 <= i <= 799:
        c[1] += 1
    elif 800 <= i <= 1199:
        c[2] += 1
    elif 1200 <= i <= 1599:
        c[3] += 1
    elif 1600 <= i <= 1999:
        c[4] += 1
    elif 2000 <= i <= 2399:
        c[5] += 1
    elif 2400 <= i <= 2799:
        c[6] += 1
    elif 2800 <= i <= 3199:
        c[7] += 1
    else:
        d += 1
e = 0
for k, v in list(c.items()):
    if v != 0:
        e += 1
print((str(max(e, 1)) + " " + str(e + d)))

a = int(eval(input()))
b = list(map(int, input().split()))
c = {}
for i in b:
    if 1 <= i <= 399:
        c[0] = 1
    elif 400 <= i <= 799:
        c[1] = 1
    elif 800 <= i <= 1199:
        c[2] = 1
    elif 1200 <= i <= 1599:
        c[3] = 1
    elif 1600 <= i <= 1999:
        c[4] = 1
    elif 2000 <= i <= 2399:
        c[5] = 1
    elif 2400 <= i <= 2799:
        c[6] = 1
    elif 2800 <= i <= 3199:
        c[7] = 1
    else:
        if 8 not in c:
            c[8] = 1
        else:
            c[8] += 1
count = 0
se = 0
for k, v in list(c.items()):
    if k == 8:
        se = v
    else:
        count += 1
if se == 0:
    print(("{} {}".format(count, count)))
else:
    if count == 0:
        print(("{} {}".format(1, se)))
    else:
        print(("{} {}".format(count, count + se)))

-c = {0: 0, 1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0} -d = 0 +c = {} -        c[0] += 1 +        c[0] = 1 -        c[1] += 1 +        c[1] = 1 -        c[2] += 1 +        c[2] = 1 -        c[3] += 1 +        c[3] = 1 -        c[4] += 1 +        c[4] = 1 -        c[5] += 1 +        c[5] = 1 -        c[6] += 1 +        c[6] = 1 -        c[7] += 1 +        c[7] = 1 -        d += 1 -e = 0 +        if 8 not in c: +            c[8] = 1 +        else: +            c[8] += 1 +count = 0 +se = 0 -    if v != 0: -        e += 1 -print((str(max(e, 1)) + " " + str(e + d))) +    if k == 8: +        se = v +    else: +        count += 1 +if se == 0: +    print(("{} {}".format(count, count))) +else: +    if count == 0: +        print(("{} {}".format(1, se))) +    else: +        print(("{} {}".format(count, count + se)))