import collections as c
input();a=c.Counter(i//400 for i in list(map(int,input().split())))
b,c=len(set([i for i,j in a.items() if i<8])),sum([j for i,j in a.items()if i>=8])
print([b,8][b==8 or b+c>=8],[b+c,8][b==8 or b+c>=8])