N=int(input())
aN=list(map(int,input().split()))
colors=set()
sp_col=0
for a in aN:
  if      1<=a and a<= 399:colors.add('gray')
  elif  400<=a and a<= 799:colors.add('brown')
  elif  800<=a and a<=1199:colors.add('green')
  elif 1200<=a and a<=1599:colors.add('splash')
  elif 1600<=a and a<=1999:colors.add('blue')
  elif 2000<=a and a<=2399:colors.add('yellow')
  elif 2400<=a and a<=2799:colors.add('orange')
  elif 2800<=a and a<=3199:colors.add('red')
  else:sp_col+=1
  pass
min_col = 0
if len(colors)==0:
  if sp_col>=1:
    min_col=1
    max_col=min(8,sp_col)
  else:
    min_col=0
    max_col=min(8,sp_col)
else:
  min_col=len(colors)
  max_col=min(8,min_col+sp_col)

print("{} {}".format(min_col,max_col))


