from collections import defaultdict

n = int(input())
a = list(map(int, input().split()))
rate_cnt = defaultdict(int)
for i in range(n):
    if a[i] >= 3200:
        rate_cnt["free"] += 1
    elif a[i] >= 2800:
        rate_cnt["red"] += 1
    elif a[i] >= 2400:
        rate_cnt["orange"] += 1
    elif a[i] >= 2000:
        rate_cnt["yellow"] += 1
    elif a[i] >= 1600:
        rate_cnt["blue"] += 1
    elif a[i] >= 1200:
        rate_cnt["l_blue"] += 1
    elif a[i] >= 800:
        rate_cnt["green"] += 1
    elif a[i] >= 400:
        rate_cnt["blown"] += 1
    else:
        rate_cnt["ash"] += 1

color_cnt = len(rate_cnt)
if "free" in rate_cnt:
    color_cnt -= 1
print(color_cnt)
print(min(color_cnt + rate_cnt["free"], 8))