#!/usr/bin/env python3
import sys
sys.setrecursionlimit(300000)


def solve(N: int, a: "List[int]"):
    tmp = 0
    s = set()
    for v in a:
        if v >= 3200:
            tmp += 1
        else:
            s.add(v // 400)
    ret = len(s)
    print(ret,  min(8, ret + tmp))
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    a = [ int(next(tokens)) for _ in range(N) ]  # type: "List[int]"
    solve(N, a)

if __name__ == '__main__':
    main()
