# ABC064C - Colorful Leaderboard
def main():
    n = int(input())
    a = [i // 400 for i in tuple(map(int, input().rstrip().split()))]
    s = set(a)
    if 8 not in s:
        print(len(s), len(s))
    elif s == {8}:
        print(1, min(8, n))
    else:
        print(len(s) - 1, min(8, len(s) - 1 + a.count(8)))


if __name__ == "__main__":
    main()