import sys

input = sys.stdin.readline


def main():
    N = int(input())
    A = [int(x) for x in input().split()]

    color = [0] * 9
    ans = 0
    for a in A:
        if a >= 3200:
            color[8] += 1
        else:
            color[a // 400] += 1

    mi = 0
    for c in color[:8]:
        if c > 0:
            mi += 1
    if mi == 0:
        print(1, 1)
    else:
        print(mi, mi + color[8])



    

if __name__ == '__main__':
    main()

