from collections import Counter

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

colors = []

for a in A:
    if 1 <= a <= 399:
        colors.append("gray")
    if 400 <= a <= 799:
        colors.append("brawn")
    if 800 <= a <= 1199:
        colors.append("green")
    if 1200 <= a <= 1599:
        colors.append("water")
    if 1600 <= a <= 1999:
        colors.append("blue")
    if 2000 <= a <= 2399:
        colors.append("yellow")
    if 2400 <= a <= 2799:
        colors.append("orange")
    if 2800 <= a <= 3199:
        colors.append("red")
    if 3200 <= a:
        colors.append("any")

counter = Counter(colors)

if "any" in counter:
    any_num = counter["any"]
    max_num = min(8, len(counter) - 1 + any_num)
    print(len(counter) - 1, max_num)
else:
    print(len(counter), len(counter))
