n=int(input())
a=list(map(int,input().split()))
b=[0]*9
while a:
  kazu=a.pop(0)
  if kazu < 400:
    b[0]=1
  elif kazu < 800:
    b[1]=1
  elif kazu < 1200:
    b[2]=1
  elif kazu < 1600:
    b[3]=1
  elif kazu < 2000:
    b[4]=1
  elif kazu < 2400:
    b[5]=1
  elif kazu < 2800:
    b[6]=1
  elif kazu < 3200:
    b[7]=1
  else:
    b[8]+=1
coma=b[8]
comi=0
while b:
  if b.pop() > 0:
    comi+=1
if coma > 0 and comi > 0:
  comi-=1
if coma > 0 and comi ==0:
  comi =1
print(comi,min(8,comi+coma))
