n=int(input())
A=list(map(int, input().split()))
col=[0]*8
def transcol(x):
  if 1<=x and x<=399:
    return 0
  elif 400<=x and x<=799:
    return 1
  elif 800<=x and x<=1199:
    return 2
  elif 1200<=x and x<=1599:
    return 3
  elif 1600<=x and x<=1999:
    return 4
  elif 2000<=x and x<=2399:
    return 5
  elif 2400<=x and x<=2799:
    return 6
  elif 2800<=x and x<=3199:
    return 7
free=0
for a in A:
  if a>=3200:
    free+=1
  else:
    tmp=transcol(a)
    if col[tmp]==0:
      col[tmp]=1

minans=sum(col)
maxans=minans+min(free, (8-minans))
print(minans, maxans)