# ABC064C - Colorful Leaderboard
from collections import Counter


def main():
    n = int(input())
    lst = [i // 400 for i in tuple(map(int, input().rstrip().split()))]
    cnt = Counter(lst)
    if 8 not in cnt.keys():
        print(len(cnt), len(cnt))
    else:
        x = len(cnt) - 1
        print(max(1, x), min(8, x + cnt[8]))


if __name__ == "__main__":
    main()