N = int(input())
a = list(map(int, input().split()))
b = set( ai//400 for ai in a)
m = len([ai for ai in a if ai > 3199])

if m == 0:
    print("{0} {0}".format(len(b)))
else:
    print("{0} {1}".format(max(len(b) - 1, 1), min(len(b) - 1+ m, 8)))