from collections import defaultdict
N = int(input())
A = [int(i) for i in input().split()]

def upper(x):
    if x < 3200:
        return (x//400 + 1) * 400 -1
    else:
        return 3200

Rate = defaultdict(int)
for a in A:
    Rate[upper(a)] += 1

ans = 0
for r in Rate:
    if r < 3200:
        ans += 1
print(ans, ans + Rate[3200])