import collections

def myindex(l, x, default=-1):
    if x in l:
        return l.index(x)
    else:
        return default

def main():
    N = int(input())
    a = list(map(int, input().split()))
    
    A = [x//400 for x in a]
    A.sort()
    Aitems = list(zip(*collections.Counter(A).items()))
    cntmin = len([x for x in Aitems[0] if x < 8])
    cntmax = cntmin + len([x for x in A if x >= 8])
    print(cntmin, cntmax)

if __name__ == "__main__":
    main()
