#!/usr/local/bin/python3
# https://atcoder.jp/contests/abc064/tasks/abc064_c


def check(a):
    if 1 <= a < 400:
        return 0
    elif 400 <= a < 799:
        return 1
    elif 800 <= a < 1199:
        return 2
    elif 1200 <= a < 1599:
        return 3
    elif 1600 <= a < 1999:
        return 4
    elif 2000 <= a < 2399:
        return 5
    elif 2400 <= a < 2799:
        return 6
    elif 2800 <= a < 3199:
        return 7
    elif 3200 <= a:
        return 8


N = int(input())
A = list(map(int, input().split()))

ratings = [
    '1-399', '400-799', '800-1199', '1200-1599', '1600-1999',
    '2000-2399', '2400-2799', '2800-3199', '3200-']
d = {r: 0 for r in ratings}

for a in A:
    d[ratings[check(a)]] += 1

ans = 0
for k, v in d.items():
    if k != '3200-' and v != 0:
        ans += 1

top = d['3200-']
if top == 0:
    print(ans, ans)
elif ans == 0:
    print(1, min(8, top))
else:
    print(ans, ans+min(8, top))
