import sys
from functools import reduce
import copy
import math
from pprint import pprint
import collections
import bisect


sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def int_inputs(num_of_input):
    ins = [int(input()) for i in range(num_of_input)]
    return ins


def solve(inputs):
    A = string_to_int(inputs[0])
    rate = [399, 799, 1199, 1599, 1999, 2399, 2799, 3199]

    counter = collections.Counter()
    for a in A:
        hit = -1
        for i, r in enumerate(reversed(rate)):
            if a <= r:
                hit = i
            else:
                break
        counter[hit] += 1

    if -1 in counter.keys():
        n = len(counter.keys()) - 1
        n += counter[-1]
        max_n = len(rate) if n > len(rate) else n
        min_n = len(counter.keys()) - 1
        return '{} {}'.format(min_n, max_n)
    else:
        n = len(counter.keys())
        return '{} {}'.format(n, n)


def string_to_int(string):
    return list(map(int, string.split()))


if __name__ == "__main__":
    input()
    ret = solve(inputs(1))
    print(ret)
