import math
import numpy as np

n = int(input())
a = list(map(int, input().split()))
check = [0] * 9
for i, val in enumerate(a):
    tar = math.floor(val / 400)
    if (tar > 8):
        tar = 8

    check[int(tar)] += 1

checkA = np.array(check[:8])
num = np.count_nonzero(checkA != 0)
rest = 8 - num

if (rest > check[8]):
    more = num + check[8]
    more = min(8, more)
else:

    more = 8


print(num, more)
