from collections import Counter
N=int(input())
a=Counter(list(map(lambda x:int(x)//400,input().split())))
d=a.keys()
if {8,9,10,11,12}&set(a.keys()):
    b=len(set(d)-{8,9,10,11,12})
    c=sum([a[i] for i in range(8,13)])
    print(max(b,1),min(b+c,9))
else:
    print(len(d),len(d))