def color(num: int) -> int:
    if 1 <= num <= 399:
        return 0
    if 400 <= num <= 799:
        return 1
    if 800 <= num <= 1199:
        return 2
    if 1200 <= num <= 1599:
        return 3
    if 1600 <= num <= 1999:
        return 4
    if 2000 <= num <= 2399:
        return 5
    if 2400 <= num <= 2799:
        return 6
    if 2800 <= num <= 3199:
        return 7
    if 3200 <= num:
        return 8


n = int(input())
a = list(map(int, input().split()))
arr = []
certain = 0
for num in a:
    col = color(num)
    if col == 8:
        certain += 1
    else:
        arr.append(col)

color_count = len(set(arr))
if color_count == 0:
    print(1, certain)
else:
    print(color_count, min(8, color_count + certain))
