import math

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

l = input().split()
A = [0] * 13
for a in l:
    index = int(a) // 400
    if index < 8:
        A[index] = 1
    else:
        A[index] += 1

# print(N, A)

num_colored = sum(A[:8])
num_free = sum(A[8:])

print(num_colored, num_colored + min(8 - num_colored, num_free))
