n=int(input())
a=list(map(int,input().split()))
rcnt1=rcnt2=0
color=[0]*8
for i in range(n):
  if 1<=a[i]<=399:
    color[0]=1
  elif 400<=a[i]<=799:
    color[1]=1
  elif 800<=a[i]<=1199:
    color[2]=1
  elif 1200<=a[i]<=1599:
    color[3]=1
  elif 1600<=a[i]<=1999:
    color[4]=1
  elif 2000<=a[i]<=2399:
    color[5]=1
  elif 2400<=a[i]<=2799:
    color[6]=1
  elif 2800<=a[i]<=3199:
    color[7]=1
  else:
    rcnt1+=1
    rcnt2+=1
if rcnt1>7:
  rcnt1=7
else:
  rcnt1=0
print(sum(color)+rcnt1,sum(color)+rcnt2)