from collections import Counter

N = int(input())
a = list(map(int, input().split()))
late = Counter(list(map(lambda a: a//400, a)))

count = 0
for key in [0,1,2,3,4,5,6,7]:
    if late[key] == 0:
        count += 1

max_a = min_a = 8-count
n = late[8] + late[9] + late[10] + late[11] + late[12]
if n and not min_a:
    min_a = 1

if n:
    max_a = min(max_a+n, 8)

print(min_a, max_a)