import math

l = input().split()
N = int(l[0])

l = input().split()
A = [int(a) for a in l]

# print(N, A)

colored = [0]*8
free = 0

for a in A:
    if a <= 399:
        colored[0] = 1
    elif a <= 799:
        colored[1] = 1
    elif a <= 1199:
        colored[2] = 1
    elif a <= 1599:
        colored[3] = 1
    elif a <= 1999:
        colored[4] = 1
    elif a <= 2399:
        colored[5] = 1
    elif a <= 2799:
        colored[6] = 1
    elif a <= 3199:
        colored[7] = 1
    else:
        free += 1

num_colored = sum(colored)
print(num_colored, num_colored + min(8 - num_colored, free))
