

def f(v):
    idx = [399, 799, 1199, 1599, 1999, 2399, 2799, 3199, 9999]
    for i, maxval in enumerate(idx):
        if v <= maxval: return i


def solve():
    N = int(input())
    colors = [0] * 9

    for i in [int(v) for v in input().split()]:
        colors[f(i)] += 1

    _cnt = len([c for c in colors[:-1] if c > 0])

    max_cnt = _cnt + min(8 - _cnt, colors[-1])
    min_cnt = 1 if _cnt == 0 else _cnt
    print(min_cnt, max_cnt)

solve()
