n=int(input())
a=list(map(int,input().split()))
s=[0]*8
c=0
for x in a:
  if x<400:
    s[0]=1
  elif x<800:
    s[1]=1
  elif x<1200:
    s[2]=1
  elif x<1600:
    s[3]=1
  elif x<2000:
    s[4]=1
  elif x<2400:
    s[5]=1
  elif x<2800:
    s[6]=1
  elif x<3200:
    s[7]=1
  else:
    c+=1
x=s.count(1)
y=min(x+c,8)
print(x,y) if x>0 else print(1,y)