from itertools import groupby

RANGE_TO_COLORS = {
    range(1, 400): "gray",
    range(400, 800): "brown",
    range(800, 1200): "green",
    range(1200, 1600): "lightblue",
    range(1600, 2000): "blue",
    range(2000, 2400): "yellow",
    range(2400, 2800): "orange",
    range(2800, 3200): "red",
    range(3200, 4800): "all"
}


def rate_to_color(r: int) -> str:
    for _range, color in RANGE_TO_COLORS.items():
        if r in _range:
            return color
    else:
        return "Unknown"


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

groups = []
unique_keys = []
data = sorted(A, key=rate_to_color)
for k, g in groupby(data, rate_to_color):
    groups.append(len(list(g)))
    unique_keys.append(k)

if "all" in unique_keys:
    idx = unique_keys.index("all")
    all_value = groups[idx]
    colors_exclude_all = len(unique_keys) - 1
    if (all_value - colors_exclude_all) >= 0:
        print(all_value, colors_exclude_all + all_value)
    else:
        print(colors_exclude_all, colors_exclude_all + all_value)

else:
    print(len(unique_keys), len(unique_keys))
