N=int(input()); A=list(map(int,input().split()))
L=[[1,399],[400,799],[800,1199],[1200,1599],[1600,1999],[2000,2399],[2400,2799],[2800,3199],[3200,4800]]
S=[0]*9;cnt=0
for i in range(N):
  for j in range(9):
    if L[j][0]<=A[i]<=L[j][1]:
      S[j]=S[j]+1
for i in range(8):
  if S[i]!=0:
    cnt=cnt+1
print(cnt,cnt+S[-1])