def c_ColorfulLeaderboard(N, A):

    from collections import defaultdict

    color = defaultdict(int)

    other = 0  # レート3200以上の選手の数

    for a in A:

        if 1 <= a <= 399:

            color['gray'] += 1

        elif 400 <= a <= 799:

            color['brown'] += 1

        elif 800 <= a <= 1199:

            color['green'] += 1

        elif 1200 <= a <= 1599:

            color['skyblue'] += 1

        elif 1600 <= a <= 1999:

            color['blue'] += 1

        elif 2000 <= a <= 2399:

            color['yellow'] += 1

        elif 2400 <= a <= 2799:

            color['orange'] += 1

        elif 2800 <= a <= 3199:

            color['red'] += 1

        elif 3200 <= a:

            other += 1

    # => 2 2,3 5,1 1

    return '{} {}'.format(max(1, len(color)), len(color) + other)



N=int(eval(input()))

A=[int(i) for i in input().split()]

print((c_ColorfulLeaderboard(N, A)))
def c_colorful_leaderboard(N, A):

    from collections import defaultdict

    rating_list = defaultdict(int)

    rating_color = ['gray', 'brown', 'green',

                    'skyblue', 'blue', 'yellow', 'orange', 'red']  # AtCoderのレート色

    other = 0  # レート3200以上の選手の数

    for rating in A:

        r = rating // 400  # レート色は400刻みで変わるため

        if r >= 8:  # レート3200位上

            other += 1

        else:

            rating_list[rating_color[r]] += 1

    ans = '{} {}'.format(max(1, len(rating_list)), len(rating_list) + other)

    return ans



N=int(eval(input()))

A=[int(i) for i in input().split()]

print((c_colorful_leaderboard(N, A)))
def c_ColorfulLeaderboard(N, A):
    from collections import defaultdict

    color = defaultdict(int)
    other = 0  # レート3200以上の選手の数
    for a in A:
        if 1 <= a <= 399:
            color["gray"] += 1
        elif 400 <= a <= 799:
            color["brown"] += 1
        elif 800 <= a <= 1199:
            color["green"] += 1
        elif 1200 <= a <= 1599:
            color["skyblue"] += 1
        elif 1600 <= a <= 1999:
            color["blue"] += 1
        elif 2000 <= a <= 2399:
            color["yellow"] += 1
        elif 2400 <= a <= 2799:
            color["orange"] += 1
        elif 2800 <= a <= 3199:
            color["red"] += 1
        elif 3200 <= a:
            other += 1
    # => 2 2,3 5,1 1
    return "{} {}".format(max(1, len(color)), len(color) + other)


N = int(eval(input()))
A = [int(i) for i in input().split()]
print((c_ColorfulLeaderboard(N, A)))

def c_colorful_leaderboard(N, A):
    from collections import defaultdict

    rating_list = defaultdict(int)
    rating_color = [
        "gray",
        "brown",
        "green",
        "skyblue",
        "blue",
        "yellow",
        "orange",
        "red",
    ]  # AtCoderのレート色
    other = 0  # レート3200以上の選手の数
    for rating in A:
        r = rating // 400  # レート色は400刻みで変わるため
        if r >= 8:  # レート3200位上
            other += 1
        else:
            rating_list[rating_color[r]] += 1
    ans = "{} {}".format(max(1, len(rating_list)), len(rating_list) + other)
    return ans


N = int(eval(input()))
A = [int(i) for i in input().split()]
print((c_colorful_leaderboard(N, A)))

-def c_ColorfulLeaderboard(N, A): +def c_colorful_leaderboard(N, A): -    color = defaultdict(int) +    rating_list = defaultdict(int) +    rating_color = [ +        "gray", +        "brown", +        "green", +        "skyblue", +        "blue", +        "yellow", +        "orange", +        "red", +    ]  # AtCoderのレート色 -    for a in A: -        if 1 <= a <= 399: -            color["gray"] += 1 -        elif 400 <= a <= 799: -            color["brown"] += 1 -        elif 800 <= a <= 1199: -            color["green"] += 1 -        elif 1200 <= a <= 1599: -            color["skyblue"] += 1 -        elif 1600 <= a <= 1999: -            color["blue"] += 1 -        elif 2000 <= a <= 2399: -            color["yellow"] += 1 -        elif 2400 <= a <= 2799: -            color["orange"] += 1 -        elif 2800 <= a <= 3199: -            color["red"] += 1 -        elif 3200 <= a: +    for rating in A: +        r = rating // 400  # レート色は400刻みで変わるため +        if r >= 8:  # レート3200位上 -    # => 2 2,3 5,1 1 -    return "{} {}".format(max(1, len(color)), len(color) + other) +        else: +            rating_list[rating_color[r]] += 1 +    ans = "{} {}".format(max(1, len(rating_list)), len(rating_list) + other) +    return ans -print((c_ColorfulLeaderboard(N, A))) +print((c_colorful_leaderboard(N, A)))